Skip to content
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

Fix/issue 3823 #3863

Merged
merged 1 commit into from
Oct 8, 2023
Merged

Fix/issue 3823 #3863

merged 1 commit into from
Oct 8, 2023

Conversation

akhtarmdsaad
Copy link
Contributor

Fixed CSS variable detection Syntax

It resolves the issue #3823

Changes

There is a bug in src/languages/lib/css-shared.js file.
adding an underscore( _ ) in CSS_VARIABLES fixes the problem.
Code Before:

CSS_VARIABLE: {
className: "attr",
begin: /--[A-Za-z][A-Za-z0-9_-]*/
}

image

Code After:

CSS_VARIABLE: {
className: "attr",
begin: /--[A-Za-z_][A-Za-z0-9_-]*/
//Look change in ^ here
}

after

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md

akhtarmdsaad referenced this pull request in akhtarmdsaad/highlight.js Sep 19, 2023
src/languages/cpp.js Outdated Show resolved Hide resolved
CONTRIBUTORS.md Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Oct 8, 2023

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

8 files changed

Total change +11 B

View Changes
file base pr diff
es/languages/css.min.js 3.39 KB 3.39 KB +2 B
es/languages/less.min.js 3.79 KB 3.79 KB +1 B
es/languages/scss.min.js 3.85 KB 3.85 KB +1 B
es/languages/stylus.min.js 3.49 KB 3.49 KB +2 B
languages/css.min.js 3.4 KB 3.4 KB +2 B
languages/less.min.js 3.79 KB 3.79 KB +1 B
languages/scss.min.js 3.86 KB 3.86 KB +1 B
languages/stylus.min.js 3.5 KB 3.5 KB +1 B

@joshgoebel joshgoebel merged commit a1a1235 into highlightjs:main Oct 8, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants