Skip to content

Commit

Permalink
CSS Extras: Regexp simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 22, 2017
1 parent 75b9b29 commit 5edfd2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions components/prism-css-extras.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Prism.languages.css.selector = {
pattern: /[^\{\}\s][^\{\}]*(?=\s*\{)/,
pattern: /[^{}\s][^{}]*(?=\s*\{)/,
inside: {
'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
'pseudo-class': /:[-\w]+(?:\(.*\))?/,
'class': /\.[-:\.\w]+/,
'id': /#[-:\.\w]+/,
'class': /\.[-:.\w]+/,
'id': /#[-:.\w]+/,
'attribute': /\[[^\]]+\]/
}
};

Prism.languages.insertBefore('css', 'function', {
'hexcode': /#[\da-f]{3,8}/i,
'entity': /\\[\da-f]{1,8}/i,
'number': /[\d%\.]+/
'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 5edfd2f

Please sign in to comment.