This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[wwwdocs] bin/preprocess and <DIV> vs <div>


<div> is both a tag in recent HTML and XHTML standards as well as a keyword
to denote division in MetaHTML.  I believe we came across this eons ago and
had this addresses in MetaHTML, but the workaround used there transform the
<div> tag to <DIV>, which -- XHTML being case-sensitive -- fails to validate.

The easiest fix for us is to convert <DIV back to <div.

  Use sed to work around MetaHTML brokenness wrt. <DIV>.

Installed after successfully testing on gcc.gnu.org for a couple of days.
This will also fix our replica main page at http://www.gnu.org/software/gcc/.

Gerald

Index: preprocess
===================================================================
RCS file: /cvs/gcc/wwwdocs/bin/preprocess,v
retrieving revision 1.42
diff -u -3 -p -r1.42 preprocess
--- preprocess	10 Apr 2006 12:34:41 -0000	1.42
+++ preprocess	4 Jun 2006 23:32:14 -0000
@@ -139,8 +139,10 @@ process_file()
             printf '<set-var MHTML::INCLUDE-PREFIX="%s">\n' `pwd` >> $TMPDIR/input
             cat $f >> $TMPDIR/input
             # Use sed to work around makeinfo 4.7 brokenness.
+            # Use sed to work around MetaHTML brokenness wrt. <DIV>.
             ${MHC} $TMPDIR/input \
                 | sed -e 's/_002d/-/g' -e 's/_002a/*/g' \
+                | sed -e 's/<DIV/<div/g' \
                 | awk -- \
                   '/^$/ { if( ! body ) next }  /.*/ { body=1; print $0; }' \
                 > $TMPDIR/output


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]