'vert');
$opt = array_merge($MarkupMarkupOpt, ParseArgs($opt));
$html = MarkupToHTML($pagename, $text, array('escape' => 0));
if (@$opt['caption'])
$caption = str_replace("'", ''',
"
{$opt['caption']}");
$class = preg_replace('/[^-\\s\\w]+/', ' ', @$opt['class']);
if (strpos($class, 'horiz') !== false)
{ $sep = ''; $pretext = $MarkupWordwrapFunction($text, 40); }
else
{ $sep = ''; $pretext = $MarkupWordwrapFunction($text, 75); }
/*------------------------------
* Get html tag with htmlentities
*/
$codehtml = htmlentities($html, ENT_QUOTES );
/*------------------------------
* Conditional output with html=1
*/
if(@$opt['html']) { # ouptut with html tags
$result = @"$caption
Source:<$MarkupWrapTag>$pretext$MarkupWrapTag> | $sep
Html:$codehtml | $sep
Render: $html |
";
} else { # Standard outout as in stdmarkup.php script.
$result = @"$caption
<$MarkupWrapTag>$pretext$MarkupWrapTag> | $sep$html |
";
}
return Keep($result);
}
Markup_e('markup', '<[=',
"/\\(:markup(\\s+([^\n]*?))?:\\)[^\\S\n]*\\[([=@])(.*?)\\3\\]/si",
"MarkupMarkupExtended(\$pagename, \$m[4], \$m[2])");
Markup_e('markupend', '>markup',
"/\\(:markup(\\s+([^\n]*?))?:\\)[^\\S\n]*\n(.*?)\\(:markupend:\\)/si",
"MarkupMarkupExtended(\$pagename, \$m[3], \$m[1])");
SDV($HTMLStylesFmt['markup'], "
table.markup { border:2px dotted #ccf; width:90%; }
td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
table.vert td.markup1 { border-bottom:1px solid #ccf; }
table.horiz td.markup1 { width:23em; border-right:1px solid #ccf; }
table.markup caption { text-align:left; }
div.faq p, div.faq pre { margin-left:2em; }
div.faq p.question { margin:1em 0 0.75em 0; font-weight:bold; }
div.faqtoc div.faq * { display:none; }
div.faqtoc div.faq p.question
{ display:block; font-weight:normal; margin:0.5em 0 0.5em 20px; line-height:normal; }
div.faqtoc div.faq p.question * { display:inline; }
");
?>