@@ -104,6 +104,7 @@ where
104104 } ,
105105 Token :: Characters ( SplitStatus :: Whitespace , _) => ProcessResult :: Done ,
106106 Token :: Comment ( text) => self . append_comment_to_doc ( text) ,
107+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
107108 token => {
108109 if !self . opts . iframe_srcdoc {
109110 self . unexpected ( & token) ;
@@ -124,6 +125,8 @@ where
124125 match token {
125126 Token :: Comment ( text) => self . append_comment_to_doc ( text) ,
126127
128+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
129+
127130 Token :: Characters ( SplitStatus :: NotSplit , text) => {
128131 ProcessResult :: SplitWhitespace ( text)
129132 } ,
@@ -155,6 +158,7 @@ where
155158 } ,
156159 Token :: Characters ( SplitStatus :: Whitespace , _) => ProcessResult :: Done ,
157160 Token :: Comment ( text) => self . append_comment ( text) ,
161+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
158162
159163 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
160164
@@ -186,6 +190,7 @@ where
186190 } ,
187191 Token :: Characters ( SplitStatus :: Whitespace , text) => self . append_text ( text) ,
188192 Token :: Comment ( text) => self . append_comment ( text) ,
193+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
189194
190195 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
191196
@@ -338,6 +343,7 @@ where
338343 } ,
339344
340345 Token :: Comment ( _) => self . step ( InsertionMode :: InHead , token) ,
346+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
341347
342348 Token :: Tag (
343349 tag ! ( <basefont> | <bgsound> | <link> | <meta> | <noframes> | <style>) ,
@@ -365,6 +371,7 @@ where
365371 } ,
366372 Token :: Characters ( SplitStatus :: Whitespace , text) => self . append_text ( text) ,
367373 Token :: Comment ( text) => self . append_comment ( text) ,
374+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
368375
369376 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
370377
@@ -1040,6 +1047,8 @@ where
10401047 Token :: NullCharacter | Token :: Characters ( ..) => self . process_chars_in_table ( token) ,
10411048
10421049 Token :: Comment ( text) => self . append_comment ( text) ,
1050+
1051+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction ( target, data) ,
10431052
10441053 Token :: Tag ( tag @ tag ! ( <caption>) ) => {
10451054 self . pop_until_current ( table_scope) ;
@@ -1214,6 +1223,7 @@ where
12141223 } ,
12151224 Token :: Characters ( SplitStatus :: Whitespace , text) => self . append_text ( text) ,
12161225 Token :: Comment ( text) => self . append_comment ( text) ,
1226+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
12171227
12181228 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
12191229
@@ -1405,6 +1415,7 @@ where
14051415 InsertionMode :: InTemplate => match token {
14061416 Token :: Characters ( _, _) => self . step ( InsertionMode :: InBody , token) ,
14071417 Token :: Comment ( _) => self . step ( InsertionMode :: InBody , token) ,
1418+ Token :: ProcessingInstruction ( _, _) => self . step ( InsertionMode :: InBody , token) ,
14081419
14091420 Token :: Tag (
14101421 tag ! ( <base> | <basefont> | <bgsound> | <link> | <meta> | <noframes> | <script> |
@@ -1473,6 +1484,7 @@ where
14731484 self . step ( InsertionMode :: InBody , token)
14741485 } ,
14751486 Token :: Comment ( text) => self . append_comment_to_html ( text) ,
1487+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_html ( target, data) ,
14761488
14771489 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
14781490
@@ -1501,6 +1513,7 @@ where
15011513 } ,
15021514 Token :: Characters ( SplitStatus :: Whitespace , text) => self . append_text ( text) ,
15031515 Token :: Comment ( text) => self . append_comment ( text) ,
1516+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction ( target, data) ,
15041517
15051518 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
15061519
@@ -1547,6 +1560,7 @@ where
15471560 } ,
15481561 Token :: Characters ( SplitStatus :: Whitespace , text) => self . append_text ( text) ,
15491562 Token :: Comment ( text) => self . append_comment ( text) ,
1563+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction ( target, data) ,
15501564
15511565 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
15521566
@@ -1572,6 +1586,7 @@ where
15721586 self . step ( InsertionMode :: InBody , token)
15731587 } ,
15741588 Token :: Comment ( text) => self . append_comment_to_doc ( text) ,
1589+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
15751590
15761591 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
15771592
@@ -1593,6 +1608,7 @@ where
15931608 self . step ( InsertionMode :: InBody , token)
15941609 } ,
15951610 Token :: Comment ( text) => self . append_comment_to_doc ( text) ,
1611+ Token :: ProcessingInstruction ( target, data) => self . append_processing_instruction_to_doc ( target, data) ,
15961612
15971613 Token :: Tag ( tag ! ( <html>) ) => self . step ( InsertionMode :: InBody , token) ,
15981614
0 commit comments