Skip to content

Commit

Permalink
Allow DOCTYPE in protocol definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Nxllpointer authored and ids1024 committed Sep 3, 2024
1 parent e648903 commit 1551b97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wayland-scanner/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ fn parse_or_panic<T: FromStr>(txt: &[u8]) -> T {

fn init_protocol<R: BufRead>(reader: &mut Reader<R>) -> Protocol {
// Check two firsts lines for protocol tag
for _ in 0..2 {
for _ in 0..3 {
match reader.read_event_into(&mut Vec::new()) {
Ok(Event::Decl(_)) => {
Ok(Event::Decl(_) | Event::DocType(_)) => {
continue;
}
Ok(Event::Start(bytes)) => {
Expand Down

0 comments on commit 1551b97

Please sign in to comment.