We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d71f3f5 commit adccd21Copy full SHA for adccd21
src/reader/state.rs
@@ -381,8 +381,12 @@ impl ReaderState {
381
);
382
debug_assert!(content.ends_with(b">"), "{:?}", Bytes(content));
383
384
+ // Skip `<!DOCTYPE` and `>`
385
let buf = &content[9..content.len() - 1];
386
match buf.iter().position(|&b| !is_whitespace(b)) {
387
+ // Found the first non-space symbol after `<!DOCTYPE`
388
+ // Actually, parser will guarantee, that after `<!DOCTYPE`
389
+ // at least one is_whitespace() symbol
390
Some(start) => Ok(Event::DocType(BytesText::wrap(
391
&buf[start..],
392
self.decoder(),
0 commit comments