File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -550,7 +550,8 @@ export class Matcher {
550
550
}
551
551
}
552
552
553
- const kMarkupPattern = / < ! - - [ ^ ] * ?(? = - - > ) - - > | < ( \/ ? ) ( [ a - z ] [ a - z 0 - 9 ] * - ? [ a - z 0 - 9 ] * ) \s * ( [ ^ > ] * ?) ( \/ ? ) > / ig;
553
+ // https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
554
+ const kMarkupPattern = / < ! - - [ ^ ] * ?(? = - - > ) - - > | < ( \/ ? ) ( [ a - z ] [ - . 0 - 9 _ a - z ] * ) \s * ( [ ^ > ] * ?) ( \/ ? ) > / ig;
554
555
const kAttributePattern = / ( ^ | \s ) ( i d | c l a s s ) \s * = \s * ( " ( [ ^ " ] + ) " | ' ( [ ^ ' ] + ) ' | ( \S + ) ) / ig;
555
556
const kSelfClosingElements = {
556
557
meta : true ,
Original file line number Diff line number Diff line change @@ -272,4 +272,13 @@ describe('HTML Parser', function () {
272
272
root . firstChild . tagName . should . eql ( 'my-widget' ) ;
273
273
} ) ;
274
274
} ) ;
275
+
276
+ describe ( 'Custom Element multiple dash' , function ( ) {
277
+ it ( 'parse "<my-new-widget></my-new-widget>" tagName should be "my-new-widget"' , function ( ) {
278
+
279
+ var root = parseHTML ( '<my-new-widget></my-new-widget>' ) ;
280
+
281
+ root . firstChild . tagName . should . eql ( 'my-new-widget' ) ;
282
+ } ) ;
283
+ } ) ;
275
284
} ) ;
You can’t perform that action at this time.
0 commit comments