You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the new tokens Previewers adds to supported languages have a fixed inside (if any).
This means that the presence of the Previewers plugin can change the way code is highlighted because the Previewers' tokens can match the same (or more) as (than) the tokens of the extended language.
I.e. CSS rgb(0, 0, 0) will be matched as a color token with inside function and punctuation while CSS also matches numbers (with CSS extras) and commas.
The text was updated successfully, but these errors were encountered:
@Golmote
I don't quite understand what you propose but I don't think we can. To know which inside from the original language to use we would have to know which tokens intersect with a newly added token.
So we would have to check if the intersection of the languages created by two regexes is empty.
I noticed that the new tokens Previewers adds to supported languages have a fixed
inside
(if any).This means that the presence of the Previewers plugin can change the way code is highlighted because the Previewers' tokens can match the same (or more) as (than) the tokens of the extended language.
I.e. CSS
rgb(0, 0, 0)
will be matched as acolor
token with insidefunction
andpunctuation
while CSS also matches numbers (with CSS extras) and commas.The text was updated successfully, but these errors were encountered: