From ad1b3e62aba27afa19577b18d71b1c0ac4509847 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 25 Oct 2022 12:52:42 +0200 Subject: Fix trailing whitespace around broken data Closes GH-13. Closes GH-14. --- src/construct/partial_whitespace.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/construct/partial_whitespace.rs') diff --git a/src/construct/partial_whitespace.rs b/src/construct/partial_whitespace.rs index bb25075..8e58838 100644 --- a/src/construct/partial_whitespace.rs +++ b/src/construct/partial_whitespace.rs @@ -67,6 +67,8 @@ use alloc::vec; /// Resolve whitespace. pub fn resolve_whitespace(tokenizer: &mut Tokenizer, hard_break: bool, trim_whole: bool) { + tokenizer.map.consume(&mut tokenizer.events); + let mut index = 0; while index < tokenizer.events.len() { -- cgit