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) { if (_cm !== cm) {
return; 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) { if (!match) {
return []; return [];
} }

View File

@ -10,7 +10,7 @@ const usercss = (() => {
// updateURL: 'updateUrl', // updateURL: 'updateUrl',
name: undefined, 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']); const ERR_ARGS_IS_LIST = new Set(['missingMandatory', 'missingChar']);
return {buildMeta, buildCode, assignVars}; return {buildMeta, buildCode, assignVars};