@@ -1068,17 +1068,19 @@ impl<'sink, Sink: TokenSink> Tokenizer<'sink, Sink> {
1068
1068
} } ,
1069
1069
1070
1070
//§ after-doctype-name-state
1071
- states:: AfterDoctypeName => loop { match ( ) {
1072
- _ if lookahead_and_consume ! ( self , 6 , |s| s. eq_ignore_ascii_case( "public" ) )
1073
- => go ! ( self : to AfterDoctypeKeyword Public ) ,
1074
- _ if lookahead_and_consume ! ( self , 6 , |s| s. eq_ignore_ascii_case( "system" ) )
1075
- => go ! ( self : to AfterDoctypeKeyword System ) ,
1076
- _ => match get_char ! ( self ) {
1077
- '\t' | '\n' | '\x0C' | ' ' => ( ) ,
1078
- '>' => go ! ( self : emit_doctype; to Data ) ,
1079
- _ => go ! ( self : error; force_quirks; to BogusDoctype ) ,
1080
- } ,
1081
- } } ,
1071
+ states:: AfterDoctypeName => loop {
1072
+ if lookahead_and_consume ! ( self , 6 , |s| s. eq_ignore_ascii_case( "public" ) ) {
1073
+ go ! ( self : to AfterDoctypeKeyword Public ) ;
1074
+ } else if lookahead_and_consume ! ( self , 6 , |s| s. eq_ignore_ascii_case( "system" ) ) {
1075
+ go ! ( self : to AfterDoctypeKeyword System ) ;
1076
+ } else {
1077
+ match get_char ! ( self ) {
1078
+ '\t' | '\n' | '\x0C' | ' ' => ( ) ,
1079
+ '>' => go ! ( self : emit_doctype; to Data ) ,
1080
+ _ => go ! ( self : error; force_quirks; to BogusDoctype ) ,
1081
+ }
1082
+ }
1083
+ } ,
1082
1084
1083
1085
//§ after-doctype-public-keyword-state after-doctype-system-keyword-state
1084
1086
states:: AfterDoctypeKeyword ( kind) => loop { match get_char ! ( self ) {
@@ -1155,15 +1157,17 @@ impl<'sink, Sink: TokenSink> Tokenizer<'sink, Sink> {
1155
1157
} } ,
1156
1158
1157
1159
//§ markup-declaration-open-state
1158
- states:: MarkupDeclarationOpen => loop { match ( ) {
1159
- _ if lookahead_and_consume ! ( self , 2 , |s| s == "--" )
1160
- => go ! ( self : clear_comment; to CommentStart ) ,
1161
- _ if lookahead_and_consume ! ( self , 7 , |s| s. eq_ignore_ascii_case( "doctype" ) )
1162
- => go ! ( self : to Doctype ) ,
1163
- // FIXME: CDATA, requires "adjusted current node" from tree builder
1164
- // FIXME: 'error' gives wrong message
1165
- _ => go ! ( self : error; to BogusComment ) ,
1166
- } } ,
1160
+ states:: MarkupDeclarationOpen => loop {
1161
+ if lookahead_and_consume ! ( self , 2 , |s| s == "--" ) {
1162
+ go ! ( self : clear_comment; to CommentStart ) ;
1163
+ } else if lookahead_and_consume ! ( self , 7 , |s| s. eq_ignore_ascii_case( "doctype" ) ) {
1164
+ go ! ( self : to Doctype ) ;
1165
+ } else {
1166
+ // FIXME: CDATA, requires "adjusted current node" from tree builder
1167
+ // FIXME: 'error' gives wrong message
1168
+ go ! ( self : error; to BogusComment ) ;
1169
+ }
1170
+ } ,
1167
1171
1168
1172
//§ cdata-section-state
1169
1173
states:: CdataSection
0 commit comments