Skip to content

Commit 151d933

Browse files
committed
fix regex for component identification to allow digits in names
1 parent 9d651ab commit 151d933

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/thoth/transform/Analyzer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function assessElement(node) {
237237
// TODO: <namespaces:el and <member.express.ion
238238
const isCustom = node.isCustomElement = identifier.name.includes('-');
239239
node.isVoidElement = !isCustom && voidElements.has(identifier.name);
240-
const isComponent = node.isComponent = !isCustom && /^[A-Z$][a-zA-Z]*$/.test(identifier.name);
240+
const isComponent = node.isComponent = !isCustom && /^[A-Z$][a-zA-Z0-9]*$/.test(identifier.name);
241241
if(isComponent) {
242242
node.props = [];
243243
node.componentExpr = identifier;

0 commit comments

Comments
 (0)