all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug in HTML or XML syntax highlighting code
@ 2008-06-09 18:51 Paul Pogonyshev
  0 siblings, 0 replies; only message in thread
From: Paul Pogonyshev @ 2008-06-09 18:51 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

Hi,

With fairly recent SVN build of Emacs I have the attached HTML file
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>.  With an almost a year old build at
home, I don't see this bug, so it is a regression in Emacs.

It seems that HTML/XML mode uses two different ways to find syntactic
context for indenting code and for syntax-highlighting it, which I
find bad.  In some larger files I managed to get half a file highlighted
(wrongly!) with `font-lock-string-face', yet code indenting worked
just fine.  So, the same piece of code is considered an attribute value
by highlighting code, but normal tag tree by code indenting code.

Also, the bug seems to be heavily dependent on JIT highlighting.  E.g.
if you remove and then reinsert some of the characters which Emacs
considers parens, code is then rehighlighted correctly.

Paul

[-- Attachment #2: bug.html --]
[-- Type: text/html, Size: 130 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-09 18:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 18:51 bug in HTML or XML syntax highlighting code Paul Pogonyshev

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.