Fix: shouldn't contain new line

This commit is contained in:
eight 2017-09-14 09:10:11 +08:00
parent b7b5888431
commit 37c83ce187

View File

@ -189,7 +189,7 @@ function createSourceEditor(style) {
function *findAppliesTo(posStart, posEnd) {
const text = cm.getValue();
const re = /^[\t ]*@-moz-document\s+/mg;
const applyRe = /^(url|url-prefix|domain|regexp)\(((['"])(?:\\\3|[\s\S])*?\3|[^)]*)\)[\s,]*/i;
const applyRe = /^(url|url-prefix|domain|regexp)\(((['"])(?:\\\\|\\\n|\\\3|[^\n])*?\3|[^)\n]*)\)[\s,]*/i;
let preIndex = re.lastIndex = posStart;
let match;
let pos = cm.posFromIndex(preIndex);