1
0
mirror of synced 2025-12-23 03:44:00 -05:00

make the pattern a string in all-versions so it can be serialized, and regex-ify it during implementation

This commit is contained in:
Sarah Schneider
2022-06-07 18:38:50 -04:00
parent f3bd355941
commit 56c1531708
3 changed files with 4 additions and 6 deletions

View File

@@ -105,7 +105,7 @@ describe('lint Liquid versioning', () => {
function validateVersion(version) {
const isSupported = allowedVersionNames.includes(version)
const isException = Object.values(allVersions).some(
(v) => v.allowedInlinePattern && v.allowedInlinePattern.test(version)
(v) => v.allowedInlinePattern && new RegExp(v.allowedInlinePattern).test(version)
)
const isValid = isSupported || isException