GNU bug report logs - #401
bug in HTML or XML syntax highlighting code

Previous Next

Package: emacs;

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

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Tom Tromey <tom <at> tromey.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#401: closed (bug in HTML or XML syntax highlighting code)
Date: Sun, 21 May 2017 16:15:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 21 May 2017 10:14:04 -0600
with message-id <87y3tqdw6r.fsf <at> bapiya>
and subject line fixed by mhtml-mode
has caused the debbugs.gnu.org bug report #401,
regarding bug in HTML or XML syntax highlighting code
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
401: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=401
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Pogonyshev <pogonyshev <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: bug in HTML or XML syntax highlighting code
Date: Thu, 12 Jun 2008 23:20:04 +0300
Hi,

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>.  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.

[originally posted to emacs-devel <at> gnu.org, with attachment instead of
 inlined HTML]

Bug in:

<html>
<head>
  <script>
    function x () { return 1 > 0; }
  </script>
</head>
<body class="foo">
</body>
</html>

Paul



[Message part 3 (message/rfc822, inline)]
From: Tom Tromey <tom <at> tromey.com>
To: 401-done <at> debbugs.gnu.org
Subject: fixed by mhtml-mode
Date: Sun, 21 May 2017 10:14:04 -0600
I tried this test case using mhtml-mode, and it works fine there.
Because mhtml is the default now for HTML files, I think this bug has
been fixed.

thanks,
Tom


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.