Skip to content

Commit

Permalink
Reuse CSS selector pattern in CSS Extras (PrismJS#1637)
Browse files Browse the repository at this point in the history
The CSS extras for the selector now use the CSS selector pattern.
  • Loading branch information
RunDevelopment authored and ggrossetie committed Mar 11, 2019
1 parent 706c969 commit 3f3bf1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/prism-css-extras.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Prism.languages.css.selector = {
pattern: /[^{}\s][^{}]*(?=\s*\{)/,
pattern: Prism.languages.css.selector,
inside: {
'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
'pseudo-class': /:[-\w]+(?:\(.*\))?/,
Expand All @@ -13,4 +13,4 @@ Prism.languages.insertBefore('css', 'function', {
'hexcode': /#[\da-f]{3,8}/i,
'entity': /\\[\da-f]{1,8}/i,
'number': /[\d%.]+/
});
});
2 changes: 1 addition & 1 deletion components/prism-css-extras.min.js

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

0 comments on commit 3f3bf1f

Please sign in to comment.