1
0
mirror of synced 2025-12-20 02:19:14 -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

@@ -265,9 +265,7 @@ function getValidProps(versionObj) {
// If a version has an exception pattern, both '*' and the exception pattern are valid.
if (versionObj.allowedFrontmatterPattern) {
valid.pattern = new RegExp(
`${asteriskPattern.source}|${versionObj.allowedFrontmatterPattern.source}`
)
valid.pattern = new RegExp(`${asteriskPattern.source}|${versionObj.allowedFrontmatterPattern}`)
valid.message = `Must have a value of '*' or ${versionObj.allowedFrontmatterPattern}`
}