File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ export class Matcher {
550
550
}
551
551
}
552
552
553
- const kMarkupPattern = / < ! - - [ ^ ] * ?(? = - - > ) - - > | < ( \/ ? ) ( [ a - z ] [ a - z 0 - 9 ] * ) \s * ( [ ^ > ] * ?) ( \/ ? ) > / ig;
553
+ const kMarkupPattern = / < ! - - [ ^ ] * ?(? = - - > ) - - > | < ( \/ ? ) ( [ a - z ] [ a - z 0 - 9 ] * - ? [ a - z 0 - 9 ] * ) \s * ( [ ^ > ] * ?) ( \/ ? ) > / ig;
554
554
const kAttributePattern = / ( ^ | \s ) ( i d | c l a s s ) \s * = \s * ( " ( [ ^ " ] + ) " | ' ( [ ^ ' ] + ) ' | ( \S + ) ) / ig;
555
555
const kSelfClosingElements = {
556
556
meta : true ,
Original file line number Diff line number Diff line change @@ -263,4 +263,13 @@ describe('HTML Parser', function () {
263
263
root . toString ( ) . should . eql ( html )
264
264
} ) ;
265
265
} ) ;
266
+
267
+ describe ( 'Custom Element' , function ( ) {
268
+ it ( 'parse "<my-widget></my-widget>" tagName should be "my-widget"' , function ( ) {
269
+
270
+ var root = parseHTML ( '<my-widget></my-widget>' ) ;
271
+
272
+ root . firstChild . tagName . should . eql ( 'my-widget' ) ;
273
+ } ) ;
274
+ } ) ;
266
275
} ) ;
You can’t perform that action at this time.
0 commit comments