From 1551b97392f1b19b5dadbd94138f27df7d723bd2 Mon Sep 17 00:00:00 2001 From: Nxllpointer <54677650+Nxllpointer@users.noreply.github.com> Date: Sat, 10 Aug 2024 12:32:38 +0200 Subject: [PATCH] Allow DOCTYPE in protocol definition --- wayland-scanner/src/parse.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wayland-scanner/src/parse.rs b/wayland-scanner/src/parse.rs index c8dc2a62245..55611fbfa31 100644 --- a/wayland-scanner/src/parse.rs +++ b/wayland-scanner/src/parse.rs @@ -54,9 +54,9 @@ fn parse_or_panic(txt: &[u8]) -> T { fn init_protocol(reader: &mut Reader) -> 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)) => {