Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 1.40 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Markup("__", "inline", "/__(.*?)__/", "<b>$1</b>");    # __bold__
  2.  
  3. Markup('$$','inline','/\$\$(.*?)\$\$/',"<span class='doc-keyword'>$1</span>"); # $$keywords$$
  4. Markup('``','inline','/``(.*?)``/',"<span class='doc-prop'>$1</span>"); # ``property``
  5. Markup('^^','inline','/\^\^(.*?)\^\^/',"<span class='doc-menu'>$1</span>"); # ^^menu item^^
  6. Markup('>>>','inline','/&gt;&gt;&gt;/',"%padding-left=1.5em%"); # >>> = indent
  7. Markup('html', 'fulltext', '/\\(:html:\\)(.*?)\\(:htmlend:\\)/esi',
  8.   "'<:block>'.Keep(str_replace(array('&gt;','&lt;','&amp;'), array('>','<','&'), PSS('$1')))"); # (:html:) ... (:htmlend:) - raw HTML markup
  9.  
  10. # (:code:) ... (:codeend:) - code box !!!
  11. Markup('(:code:)','fulltext','/\\(:code:\\)(.*?)\\(:codeend:\\)/esi',"'<div style=\"background:#f9f9f9; padding:5px; border:1px solid #d0d0d0;\">'.str_replace('\n', '\n ', PSS('$1')).'</div>'");
  12.  
  13. # (:showhide name="example":) ... (:showhideend:) - TeamLiquid style Show / Hide (Spoiler)
  14. Markup('(:showhide:)','fulltext','/\\(:showhide name *= *[\'\"]([^\'\"]*)[\'\"]:\\)(.*?)\\(:showhideend:\\)/esi',"IncludeShowHideOnce().'<a id=\"$1\" style=\"text-decoration:none;font-family:monospace;color:#606060;\" href=\"#$1\" title=\"$1\" onClick=\"return showhide(this)\">+ Show [$1] +</a> <div id=\"$1_div\" style=\"background:#EBEFF2; padding:5px; border:1px solid #808080; display:none;\">'.PSS('$2').'</div><noscript>'.PSS('$2').'</noscript>'");