Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jun 1997 16:03:56 +0200 (CEST)
From:      Philippe Charnier <charnier@xp11.frmug.org>
To:        doc@FreeBSD.org
Subject:   incorrect translation of <code></code>
Message-ID:  <199706281403.QAA04918@xp11.frmug.org>

next in thread | raw e-mail | index | archive | help
Hello,

looking at the handbook ``Checking Printer Communications'' in printing.sgml
I saw that <code> is incorrectly translated to &lt;hr&gt;<pre>. </code>
follows the same rule. This put a lot of `<hr>' in the final document.

(search for the word `suffice' in printing.sgml)

In /usr/share/sgml/transpec/linuxdoc-html.ts:

<rule>
<match>
  <gi>CODE
<action>
  <start>^&lt;hr&gt;&lt;pre&gt;^</start>
  <end>^&lt;/pre&gt;&lt;hr&gt;^</end>
</rule>


In /usr/bin/sgmlfmt:

    while (<$infile>) {
        # change `<' and `>' to `&lt;' and `&gt;' in <pre></pre>
        if (/<pre>/.../<\/pre>/) {
            s/</\&lt;/g;
            s/\&lt;([\/]*)pre>/<\1pre>/g;
            s/>/\&gt;/g;
            s/<([\/]*)pre\&gt;/<\1pre>/g;
        }
  
-- 
------                                                            ------ 
Philippe Charnier                               charnier@lirmm.fr (smtp)       
                                          charnier@xp11.frmug.org (uucp) 

    ``a PC not running FreeBSD is like a venusian with no tentacles'' 
------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706281403.QAA04918>