diff --git a/js/meta-parser.js b/js/meta-parser.js index 5a0aa734..10058ceb 100644 --- a/js/meta-parser.js +++ b/js/meta-parser.js @@ -5,12 +5,6 @@ const metaParser = (() => { require(['/vendor/usercss-meta/usercss-meta.min']); /* global usercssMeta */ const {createParser, ParseError} = usercssMeta; const PREPROCESSORS = new Set(['default', 'uso', 'stylus', 'less']); - /** Relaxed semver: - * dot-separated digits sequence e.g. 1 or 1.2 or 1.2.3.4.5 - * optional pre-release chunk: "-" followed by dot-separated word characters, "-" - * optional build chunk: "+" followed by dot-separated word characters, "-" - */ - const RX_VER = /^\d+(\.\d+)*(?:-(\w[-\w]*(\.[-\w]+)*))?(?:\+(\w[-\w]*(\.[-\w]+)*))?$/; const options = { validateKey: { preprocessor: state => { @@ -22,15 +16,6 @@ const metaParser = (() => { }); } }, - version: state => { - if (!RX_VER.test(state.value)) { - throw new ParseError({ - code: 'invalidVersion', - message: 'Invalid @version', - index: state.valueIndex, - }); - } - }, }, validateVar: { select: state => {