-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(CSS) custom property --_margin-top: 1rem
, top
gets wrongly highlighted
#3823
Comments
One fix here might be to use a multi-matcher. (example: https://highlightjs.readthedocs.io/en/latest/mode-reference.html#beginscope). You'd first match Once we could use lookbehind you'd just do a lookbehind for "not space" instead of A PR would be welcome here if you hav time. |
Hi @joshgoebel I would like to solve this issue please assign this to me |
We don't usually do assignments, but I don't think anyone is rushing to complete this before you do. Happy to see a PR if you contribute one. |
I think this should be closed as it was solved in #3863 |
Looks like it's fixed in the official site's demo. |
Describe the issue
In CSS, custom property such as
--_margin-top: 1rem
,top
gets wrongly highlightedIt seems to be caused by some kind of interaction between the underscore and hyphen.
Which language seems to have the issue?
CSS, I'm using
language="css"
and NOT using auto-detect.Sample Code to Reproduce
Expected behavior
--_margin-top
should be treated as an atomic unit of text for highlighting purposes.The text was updated successfully, but these errors were encountered: