diff --git a/src/index.ts b/src/index.ts
index c1bbc92..7287e97 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -550,7 +550,7 @@ export class Matcher {
}
}
-const kMarkupPattern = /)-->|<(\/?)([a-z][a-z0-9]*)\s*([^>]*?)(\/?)>/ig;
+const kMarkupPattern = /)-->|<(\/?)([a-z][a-z0-9]*-?[a-z0-9]*)\s*([^>]*?)(\/?)>/ig;
const kAttributePattern = /(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/ig;
const kSelfClosingElements = {
meta: true,
diff --git a/test/html.js b/test/html.js
index c3635d2..b390035 100644
--- a/test/html.js
+++ b/test/html.js
@@ -263,4 +263,13 @@ describe('HTML Parser', function () {
root.toString().should.eql(html)
});
});
+
+ describe('Custom Element', function () {
+ it('parse "" tagName should be "my-widget"', function () {
+
+ var root = parseHTML('');
+
+ root.firstChild.tagName.should.eql('my-widget');
+ });
+ });
});