diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 0e95c843b8..3b4261f76e 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -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]+(?:\(.*\))?/, @@ -13,4 +13,4 @@ Prism.languages.insertBefore('css', 'function', { 'hexcode': /#[\da-f]{3,8}/i, 'entity': /\\[\da-f]{1,8}/i, 'number': /[\d%.]+/ -}); \ No newline at end of file +}); diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 76b85d1046..f3d252f762 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:/[^{}\s][^{}]*(?=\s*\{)/,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\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%.]+/}); \ No newline at end of file +Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\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%.]+/}); \ No newline at end of file