Allow /*! in UserCSS metadata. Closes #571

This commit is contained in:
Rob Garrison 2018-11-20 17:06:20 -06:00
parent 99951efc80
commit 33df061b53
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ function createMetaCompiler(cm) {
if (_cm !== cm) {
return;
}
const match = text.match(/\/\*\s*==userstyle==[\s\S]*?==\/userstyle==\s*\*\//i);
const match = text.match(/\/\*\!?\s*==userstyle==[\s\S]*?==\/userstyle==\s*\*\//i);
if (!match) {
return [];
}

View File

@ -10,7 +10,7 @@ const usercss = (() => {
// updateURL: 'updateUrl',
name: undefined,
};
const RX_META = /\/\*\s*==userstyle==[\s\S]*?==\/userstyle==\s*\*\//i;
const RX_META = /\/\*\!?\s*==userstyle==[\s\S]*?==\/userstyle==\s*\*\//i;
const ERR_ARGS_IS_LIST = new Set(['missingMandatory', 'missingChar']);
return {buildMeta, buildCode, assignVars};