all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
To: emacs-devel@gnu.org
Subject: bug in HTML or XML syntax highlighting code
Date: Mon, 9 Jun 2008 21:51:03 +0300	[thread overview]
Message-ID: <200806092151.03324.pogonyshev@gmx.net> (raw)

[-- 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 --]

                 reply	other threads:[~2008-06-09 18:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200806092151.03324.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.