GNU bug report logs -
#25529
25.1.90; js-mode: Regexp literal with unbalanced brackets breaks font-lock
Previous Next
Reported by: Mikhail Gusarov <mikhail <at> hola.org>
Date: Wed, 25 Jan 2017 11:15:02 UTC
Severity: minor
Found in version 25.1.90
Done: Tom Tromey <tom <at> tromey.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> Also, what is the purpose of the first call to
>> js-syntax-propertize-regexp in js-syntax-propertize?
It tests if the start point is inside a regexp, and if so, does what's
needed with it and moves to its end since the rest of the
js-syntax-propertize code assumes we're outside of a regexp.
> I'm not sure. Normally, that helps deal with multiline literals, but regexps
> in JavaScript are single-line. Maybe Stefan remembers.
I think I just didn't want to presume that the start point is never
inside a regexp (not sure if I was aware that Javascrit doesn't support
multiline regexps, but in any case I'd be surprised if there isn't some
Javascript implementation somewhere which does). IOW I just reproduced
the pattern I've used in many other syntax-propertize-functions.
Maybe it's not needed, but it doesn't hurt.
Stefan
This bug report was last modified 8 years and 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.