diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2014-12-29 16:25:07 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2014-12-29 16:25:07 +0000 |
commit | a25b4b9b966d3236e200676a4ae658ab494daae2 (patch) | |
tree | e8fd5a80256d075fcd516babb2823dd8f5be61d8 | |
parent | b949111fd42c7b83cdfe9753578dc6002220c8ce (diff) | |
download | pmwiki.svn-a25b4b9b966d3236e200676a4ae658ab494daae2.tar.bz2 |
Unwrap PmWiki markup examples, add overflow:auto to CSS (PITS:01360)
git-svn-id: svn://pmwiki.org/pmwiki/trunk@3017 524c5546-5005-0410-9a3e-e25e191bd360
-rw-r--r-- | scripts/stdmarkup.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/scripts/stdmarkup.php b/scripts/stdmarkup.php index c3bd8890..41d165be 100644 --- a/scripts/stdmarkup.php +++ b/scripts/stdmarkup.php @@ -433,8 +433,6 @@ Markup('^>><<', '<^>>', #### special stuff #### ## (:markup:) for displaying markup examples function MarkupMarkup($pagename, $text, $opt = '') { - global $MarkupWordwrapFunction; - SDV($MarkupWordwrapFunction, 'wordwrap'); $MarkupMarkupOpt = array('class' => 'vert'); $opt = array_merge($MarkupMarkupOpt, ParseArgs($opt)); $html = MarkupToHTML($pagename, $text, array('escape' => 0)); @@ -442,12 +440,10 @@ function MarkupMarkup($pagename, $text, $opt = '') { $caption = str_replace("'", ''', "<caption>{$opt['caption']}</caption>"); $class = preg_replace('/[^-\\s\\w]+/', ' ', @$opt['class']); - if (strpos($class, 'horiz') !== false) - { $sep = ''; $pretext = $MarkupWordwrapFunction($text, 40); } - else - { $sep = '</tr><tr>'; $pretext = $MarkupWordwrapFunction($text, 75); } + $sep = (strpos($class, 'horiz') !== false) ? '' : '</tr><tr>'; + return Keep(@"<table class='markup $class' align='center'>$caption - <tr><td class='markup1' valign='top'><pre>$pretext</pre></td>$sep<td + <tr><td class='markup1' valign='top'><pre>$text</pre></td>$sep<td class='markup2' valign='top'>$html</td></tr></table>"); } @@ -461,8 +457,8 @@ Markup_e('markupend', '>markup', 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.vert td.markup1 { border-bottom:1px solid #ccf; width:100%; overflow: auto; } + table.horiz td.markup1 { width:23em; border-right:1px solid #ccf; overflow: auto; } 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; } |