fixup d660e6bd: off-by-1 in parseStringUnquoted
This commit is contained in:
parent
71f3dfbffd
commit
9c3229717f
|
@ -252,7 +252,7 @@ var usercss = (() => {
|
||||||
function parseStringUnquoted(state) {
|
function parseStringUnquoted(state) {
|
||||||
const pos = state.re.lastIndex;
|
const pos = state.re.lastIndex;
|
||||||
const nextQuoteOrEOL = posOrEnd(state.text, '"', pos);
|
const nextQuoteOrEOL = posOrEnd(state.text, '"', pos);
|
||||||
state.re.lastIndex = Math.max(0, nextQuoteOrEOL - 1);
|
state.re.lastIndex = nextQuoteOrEOL;
|
||||||
state.value = state.text.slice(pos, nextQuoteOrEOL).trim().replace(/\s+/g, '-');
|
state.value = state.text.slice(pos, nextQuoteOrEOL).trim().replace(/\s+/g, '-');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user