diff --git a/js/usercss.js b/js/usercss.js index 9059d385..61fc84e6 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -213,7 +213,9 @@ var usercss = (() => { } function parseEOT(state) { - const match = state.text.slice(state.re.lastIndex).match(/^<< { } function parseStringUnquoted(state) { - const match = state.text.slice(state.re.lastIndex).match(/^[^"]*/); + const re = /[^"]*/y; + re.lastIndex = state.re.lastIndex; + const match = state.text.match(re); state.re.lastIndex += match[0].length; state.value = match[0].trim().replace(/\s+/g, '-'); }