From aaa0b06ab30d5cf5e62a52e7e879e6d9f64ba7a1 Mon Sep 17 00:00:00 2001 From: Adrian Kremer Date: Wed, 18 Nov 2020 14:22:53 +0100 Subject: [PATCH] feat: updated regex validation of element attributes to enable 'aria-label' for example --- src/utils/checkTemplate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/checkTemplate.js b/src/utils/checkTemplate.js index d8014bc..0331c40 100644 --- a/src/utils/checkTemplate.js +++ b/src/utils/checkTemplate.js @@ -49,7 +49,7 @@ export default function($options, checkVariableAvailability) { const templateVars = []; if (templateAst.type === ELEMENT) { templateAst.props.forEach((attr) => { - if (!/^[a-z,-,:]+$/g.test(attr.name)) { + if (!/^[a-z-:]+$/g.test(attr.name)) { throw new VueLiveParseTemplateAttrError( "[VueLive] Invalid attribute name: " + attr.name, attr.loc