diff --git a/.eslintrc.json b/.eslintrc.json index a8ac414..bf69df2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,7 @@ { "extends": "theme-next", + "parserOptions": { + "ecmaVersion": 2018 + }, "root": true } diff --git a/scripts/events/lib/highlight.js b/scripts/events/lib/highlight.js index f6f900b..43ede36 100644 --- a/scripts/events/lib/highlight.js +++ b/scripts/events/lib/highlight.js @@ -5,7 +5,7 @@ function parse(file) { let rule = ''; let background = ''; let foreground = ''; - css.replace(/\.hljs([^\S]+|,[^\{]+)\{(.*?)\}/sg, (match, $1, content) => { + css.replace(/\.hljs(\s+|,[^{]+)\{(.*?)\}/sg, (match, $1, content) => { rule += content; return match; });