<< Preformatted WikiFree text. >>
Three and four angle brackets will yield some extra indentation.
Add the following to the EarlyRules configuration option in /etc/usemod-wiki/config:
$EarlyRules .= <<'EOER'; $text =~ s#^\<\<\<\<(.*?)^\>\>\>\>#"<pre style=\"margin-left: 1in;\">" . &StoreRaw($1) . "</pre>"#ismge; $text =~ s#^\<\<\<(.*?)^\>\>\>#"<pre style=\"margin-left: 0.5in;\">" . &StoreRaw($1) . "</pre>"#ismge; $text =~ s#^\<\<(.*?)^\>\>#"<pre>" . &StoreRaw($1) . "</pre>"#ismge; $text =~ s#\<npre(.*?)\>(.*?)\</npre\>#"<pre$1>" . &StoreRaw($2) . "</pre>"#ismge; $text =~ s#\<ntt(.*?)\>(.*?)\</ntt\>#"<tt$1>" . &StoreRaw($2) . "</tt>"#ismge; EOER
(Cut and paste the version produced by the engine rather than the original editable content).
To highlight code insets, enable the style sheet in /etc/usemod-wiki/config:
$StyleSheet = "/usemod-wiki/wiki.css";
and then add the following line to /var/www/usemod-wiki/wiki.css:
PRE { background-color: #CCFFFF; overflow: auto; white-space: pre-wrap; white-space: -moz-pre-wrap !important; }
The white-space property may be removed to enable horizontal scroll bars instead of wrapping long lines.
One still has to adjust the pre-formatted text if its line ends with a backslash character "\" because the backslash'es semantics as a line joiner isn't overriden by the patch. Replacing trailing backslashes with "\" helps:
<< Preformatted text ending with a backslash still needs special treatment in order to not get joined with the next line: \ Suggestions on fixing this are welcome. >>