Re: Substyles for Lua and HTML can highlight more sets of identifiers

Neil Hodgson <[email protected]>
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
Implemented another feature where attributes only possible in particular 
tags only match inside those tags. This is only implemented for substyles 
attached to SCE_H_ATTRIBUTE (3). It is not implemented for the old-style 
keywords.

Tag-scoped attributes are specified as <tag>.<attribute>. Without a <tag>. 
prefix, the attribute is matched in all tags which is appropriate for 
global attributes like class and id.

In SciTE this may appear like:
substylewords.3.1.*=class id img.height img.width

If there are potential problems with using '.' as the joiner, such as '.' 
being allowed inside tags or attributes, another character could be used.

I'm not about to add a large number of tag-scoped attributes to SciTE 
manually as it looks like much research work. If there is a machine 
readable list of tags, attributes, and their relationship then that could 
be processed into properties with a script.

There is a small run-time cost which could be mitigated if it impacts 
applications significantly.

Features like this implemented within lexers can be difficult to discover, 
only really being documented within the code, the change log, and email 
messages like here.

https://github.com/ScintillaOrg/lexilla/commit/87d10c9fca7a6128b7d968391d746f8843ba8cb0

Neil

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/8a4c967c-1ba2-4afa-b8cd-c6084962331bn%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.