Closed
Description
Highlighting currently just picks the first token mapping it finds and applies that as that is simple and fast. This has the problem that code in attributes may become very chaotic if the spans are used a lot.
See this snippet without the database attribute
and here with it (Note the self
parameter and function name colors changing)
Syntax highlighting should attempt to prioritize a mapping that fits the input node syntactically and only pick a different one if there is no similar node to it.