diff options
author | Fred Drake <fdrake@acm.org> | 1998-03-02 16:43:59 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-03-02 16:43:59 (GMT) |
commit | f7cfb9a7a72dfc0a2a1c68411034f4ad19b970b9 (patch) | |
tree | 9a34986bbaf47be7733a707e65e94613b44ea054 /Doc/myformat.perl | |
parent | d8c5b8c90f342767620f70acbb8b56bc2176288a (diff) | |
download | cpython-f7cfb9a7a72dfc0a2a1c68411034f4ad19b970b9.zip cpython-f7cfb9a7a72dfc0a2a1c68411034f4ad19b970b9.tar.gz cpython-f7cfb9a7a72dfc0a2a1c68411034f4ad19b970b9.tar.bz2 |
&replace_verbatim,
&replace_verbatim_hook: Clean up a little, avoid long lines.
Diffstat (limited to 'Doc/myformat.perl')
-rw-r--r-- | Doc/myformat.perl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Doc/myformat.perl b/Doc/myformat.perl index 21434b3..2e64be27 100644 --- a/Doc/myformat.perl +++ b/Doc/myformat.perl @@ -346,17 +346,19 @@ sub make_str_index_entry{ # (Used with LaTeX2HTML 96.1*) sub replace_verbatim { # Modifies $_ - s/$verbatim_mark(verbatim)(\d+)/<p><dl><dd><font size=\"-1\"><pre>$verbatim{$2}<\/pre><\/font><\/dl>/go; + local($prefix,$suffix) = ("\n<p><dl><dd><pre><font size=-1>\n", + "</font></pre></dl>"); + s/$verbatim_mark(verbatim)(\d+)/$prefix$verbatim{$2}$suffix/go; s/$verbatim_mark(rawhtml)(\d+)/$verbatim{$2}/ego; # Raw HTML } - + # (Used with LaTeX2HTML 98.1) sub replace_verbatim_hook{ # Modifies $_ + local($prefix,$suffix) = ("\n<p><dl><dd><font size=-1>", + "</font></dl>"); s/$math_verbatim_rx/&put_comment("MATH: ".$verbatim{$1})/eg; -# s/$verbatim_mark(verbatim\*?)(\d+)#/<PRE>\n$verbatim{$2}\n<\/PRE>/go; - s/$verbatim_mark(\w*[vV]erbatim\*?)(\d+)#/\n<p><dl><dd><font size=\"-1\">$verbatim{$2}<\/font><\/dl>\n/go; -# s/$verbatim_mark(rawhtml)(\d+)#/$verbatim{$2}/eg; # Raw HTML + s/$verbatim_mark(\w*[vV]erbatim\*?)(\d+)\#/$prefix$verbatim{$2}$suffix/go; # Raw HTML, but replacements may have protected characters s/$verbatim_mark(rawhtml)(\d+)#/&unprotect_raw_html($verbatim{$2})/eg; s/$verbatim_mark$keepcomments(\d+)#/$verbatim{$2}/ego; # Raw TeX |