Skip to content

Commit

Permalink
Added the comma to the list of CSS punctuation
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Nov 24, 2018
1 parent 7a2d153 commit 7ea2ff2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/prism-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Prism.languages.css = {
'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,
'important': /!important\b/i,
'function': /[-a-z0-9]+(?=\()/i,
'punctuation': /[(){};:]/
'punctuation': /[(){};:,]/
};

Prism.languages.css['atrule'].inside.rest = Prism.languages.css;
Expand Down
2 changes: 1 addition & 1 deletion components/prism-css.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/prism-less.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Prism.languages.less = Prism.languages.extend('css', {
},

'property': /(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,
'punctuation': /[{}();:,]/,
'operator': /[+\-*\/]/
});

Expand Down
2 changes: 1 addition & 1 deletion components/prism-less.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ Prism.languages.css = {
'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,
'important': /!important\b/i,
'function': /[-a-z0-9]+(?=\()/i,
'punctuation': /[(){};:]/
'punctuation': /[(){};:,]/
};

Prism.languages.css['atrule'].inside.rest = Prism.languages.css;
Expand Down
8 changes: 7 additions & 1 deletion tests/languages/css/function_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ filter: opacity(alpha=0);
["punctuation", ":"],
["function", "rgba"],
["punctuation", "("],
"0, 0, 0, 0.2",
"0",
["punctuation", ","],
" 0",
["punctuation", ","],
" 0",
["punctuation", ","],
" 0.2",
["punctuation", ")"],
["punctuation", ";"],

Expand Down

0 comments on commit 7ea2ff2

Please sign in to comment.