GNU bug report logs -
#401
bug in HTML or XML syntax highlighting code
Previous Next
Reported by: Paul Pogonyshev <pogonyshev <at> gmx.net>
Date: Thu, 12 Jun 2008 20:20:03 UTC
Severity: minor
Tags: confirmed
Found in versions 24.5, 25.0.94
Done: Tom Tromey <tom <at> tromey.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> With fairly recent SVN build of Emacs I have the pasted below HTML code
> highlighted wrongly. Namely, "foo" is not highlighted as an attribute
> value, apparently because there are non-corresponding (from Emacs point
> of view) parentheses in <script>.
Indeed, part of the problem is that we use sgml-mode for this, even
though your file doesn't seem like a properly formed SGML file. We need
to add special support for <script>. Note that we do not properly
support SGML either, e.g. if you use a CDATA[[...]] construct you'll
bump into the same kinds of problems.
> It seems that HTML/XML mode uses two different ways to find syntactic
> context for indenting code and for syntax-highlighting it, which I
Most/all major modes do. The syntax-highlighting is done "globally"
(especially the comment-vs-string-vs-code distinction), so it can get
seriously messed up over the whole buffer in case the buffer's syntax is
incorrect or is using constructs which the major mode doesn't
understand. The indentation code usually can work much more locally, so
it tends to be more resilient.
Stefan
This bug report was last modified 7 years and 362 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.