>mono<< Use >>-<< for empty line with half height */ $RecipeInfo['LiteralWhiteSpace']['Version'] = '2024-04-12'; # set $EnableCodeWrap = 1; for wrapping code and pre lines # use as is or copy css styles below to local custom css file SDV($EnableCodeWrap,0); # check if browser is IE if(strpos($_SERVER["HTTP_USER_AGENT"],"MSIE")!=FALSE) $BrowserIE = 1; # New whitespace and line spacing Markup rules # honour linebreaks $HTMLPNewline = '
'; # spaces at beginning of lines, and continuing list elements Markup('^ws', '<^img', '/^(\\s+)(.*?)/', "WSIndent2"); function WSIndent2($m) { $i = $m[1]; global $MarkupFrame, $BrowserIE, $HTMLPNewline; $icol = strlen($i); for($depth = count(@$MarkupFrame[0]['cs']); $depth > 0; $depth--) if (@$MarkupFrame[0]['is'][$depth] == $icol) { $MarkupFrame[0]['idep'] = $depth; $MarkupFrame[0]['icol'] = $icol; return ''; } $sp = ' '; $brsp = ''; if($BrowserIE==1) { $sp = ' '; $brsp = ' '; } $sp = str_repeat($sp,$icol); if (@empty($MarkupFrame[0]['cs'])) return "<:p,1>$brsp$sp"; else return "<:p,1>$HTMLPNewline$brsp$sp"; } # convert spaces, but not in html tags Markup('spacing', '>style', "/(\\s{2,7})(?![^<]*>)/", "WSReplace"); function WSReplace($m) { $i = $m[1]; global $BrowserIE; $icol = strlen($i); if($BrowserIE==1) { $icol = $icol-1; return ' '.str_repeat(' ', $icol); } return str_repeat(' ', $icol); } # honour empty lines #Markup(':vspace', 'fulltext','/<:vspace>/',"

 

"); # tabs Markup('\t','inline',"/\\t/",''); # half height empty line spacer >>-<< Markup('>>-<<','inline','/>>-<</',"
"); # vertical spacing (copy styles to css stylesheet) $HTMLStylesFmt['vspace'] = " .halfline { height: 0.65em; line-height: 0.65em;} .vspace { margin-top:0; line-height:1.2em; } "; # use mono style class for monospaced font (outside of @@...@@ and [@...@]) $HTMLStylesFmt['mono'] = ".mono { font-family: Lucida Console, monospace; } "; ##======== pre and code line wrap styles =====## # wrap lines of preformatted text and code # IE may not work with word-wrap, therefore special IE rule if($EnableCodeWrap==1) { # whitespace wrap (perhaps copy styles to css stylesheet) $HTMLStylesFmt['prewrap'] = " pre.escaped, code.escaped { white-space: pre-wrap; /* CSS-3 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ _white-space: pre; } * html pre.escaped, * html code.escaped { white-space: normal; } "; }