[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sgml-mode.el: html-close-tag
From: |
Pete Forman |
Subject: |
Re: sgml-mode.el: html-close-tag |
Date: |
15 Feb 2002 11:09:00 +0000 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp (Windows [1])) |
fnatter@gmx.net (Felix Natter) writes:
> 1. I think there *might* be a bug in line 221 of sgml-mode.el:
> ("<! *--.*-- *>" . font-lock-comment-face)))
> In the HTML 4 specification (section 3.2.4), it says that there may
> be whitespace between "--" and ">", but not between "<!" and "--".
> Since html is sgml, I conclude that the same is true for sgml
> (sorry, I can't find the SGML spec)
I'd agree that that is true for SGML from looking at the spec.
This is an attempt at a regular expression to approximate productions
91 and 92 of the spec.
"<!--.*--\\(\\s-\\|--.*--\\)*>"
The approximations are . for 'SGML character' and \s- for 's' (space,
CR, LF, or HT). 'SGML character' also includes CR, LF, and HT but I'm
not sure how to express a single hyphen. Perhaps "\\([^-]\\|-[^-]\\)*"
could be used instead of ".*"
Some people use a line of hyphens within a comment. The result may or
may not be a valid comment declaration depending on how may hyphens
they use. They are inadvertently putting multiple comments within one
comment declaration.
--
Pete Forman -./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
pete.forman@westerngeco.com -./\.- opinion of Schlumberger, Baker
http://petef.port5.com (new) -./\.- Hughes or their divisions.
Message not available
Re: sgml-mode.el: html-close-tag, Richard Stallman, 2002/02/16