Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7cfb9a

Browse files
committed
&replace_verbatim,
&replace_verbatim_hook: Clean up a little, avoid long lines.
1 parent d8c5b8c commit f7cfb9a

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Doc/myformat.perl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,17 +346,19 @@ sub make_str_index_entry{
346346
# (Used with LaTeX2HTML 96.1*)
347347
sub replace_verbatim {
348348
# Modifies $_
349-
s/$verbatim_mark(verbatim)(\d+)/<p><dl><dd><font size=\"-1\"><pre>$verbatim{$2}<\/pre><\/font><\/dl>/go;
349+
local($prefix,$suffix) = ("\n<p><dl><dd><pre><font size=-1>\n",
350+
"</font></pre></dl>");
351+
s/$verbatim_mark(verbatim)(\d+)/$prefix$verbatim{$2}$suffix/go;
350352
s/$verbatim_mark(rawhtml)(\d+)/$verbatim{$2}/ego; # Raw HTML
351353
}
352-
354+
353355
# (Used with LaTeX2HTML 98.1)
354356
sub replace_verbatim_hook{
355357
# Modifies $_
358+
local($prefix,$suffix) = ("\n<p><dl><dd><font size=-1>",
359+
"</font></dl>");
356360
s/$math_verbatim_rx/&put_comment("MATH: ".$verbatim{$1})/eg;
357-
# s/$verbatim_mark(verbatim\*?)(\d+)#/<PRE>\n$verbatim{$2}\n<\/PRE>/go;
358-
s/$verbatim_mark(\w*[vV]erbatim\*?)(\d+)#/\n<p><dl><dd><font size=\"-1\">$verbatim{$2}<\/font><\/dl>\n/go;
359-
# s/$verbatim_mark(rawhtml)(\d+)#/$verbatim{$2}/eg; # Raw HTML
361+
s/$verbatim_mark(\w*[vV]erbatim\*?)(\d+)\#/$prefix$verbatim{$2}$suffix/go;
360362
# Raw HTML, but replacements may have protected characters
361363
s/$verbatim_mark(rawhtml)(\d+)#/&unprotect_raw_html($verbatim{$2})/eg;
362364
s/$verbatim_mark$keepcomments(\d+)#/$verbatim{$2}/ego; # Raw TeX

0 commit comments

Comments
 (0)