[TxMt] HTML highlighting problems
Allan Odgaard
throw-away-1 at macromates.com
Mon Apr 2 16:52:36 UTC 2007
On 31. Mar 2007, at 16:11, porneL wrote:
> If I write (a perfectly valid HTML4):
>
> <div id=foo>
>
> TextMate highlights everything up to next quoted string as an ID
> attribute. The fix for it is to set:
> end = '(?<=''|")|(?!>)';
> for tag-id-attribute in HTML's language definition.
>
> There's even no scope for non-quoted attributes. I've managed to
> add it using back-assertions (?<=[^=]) for attribute and (?<==) for
> scope of uquoted string.
>
> I'm not sure if these are proper solutions - does TM understand
> something like 'adjacent scopes'?
Prior to reading some HTML5 related stuff, I thought unquoted
attributes were strongly deprecated, but I guess not. I’ll checkin an
update soonish.
Not sure what “adjacent scopes” means. Are you thinking of “in order”
matches of language grammar sub-rules, e.g. master rule has begin/end
and a patterns array, where each rule in the patterns array has to
come in order (and “touch” so to speak)? That is presently not
supported, but on the table as a potential future improvement.
More information about the textmate
mailing list