all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	401@emacsbugs.donarmstrong.com
Cc: bug-gnu-emacs@gnu.org, Paul Pogonyshev <pogonyshev@gmx.net>
Subject: bug#401: bug in HTML or XML syntax highlighting code
Date: Sat, 14 Jun 2008 22:19:15 +0200	[thread overview]
Message-ID: <485427C3.4030602@gmail.com> (raw)
In-Reply-To: <jwvwskrajso.fsf-monnier+emacsbugreports@gnu.org>

Stefan Monnier wrote:
>> 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.

Does not nxml-mode handle this better?

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

I believe the cure to this is some multi major mode handling.






  reply	other threads:[~2008-06-14 20:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12 20:20 bug#401: bug in HTML or XML syntax highlighting code Paul Pogonyshev
2008-06-14 19:46 ` Stefan Monnier
2008-06-14 20:19   ` Lennart Borgman (gmail) [this message]
2017-05-21 16:14 ` bug#401: fixed by mhtml-mode Tom Tromey

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=485427C3.4030602@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=401@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=pogonyshev@gmx.net \
    /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.