aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/partial_whitespace.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-25 12:52:42 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-25 12:52:42 +0200
commitad1b3e62aba27afa19577b18d71b1c0ac4509847 (patch)
tree063a6d231f66f4097de6af80f3333133dc9c96e0 /src/construct/partial_whitespace.rs
parent2cd3e65fd85b137f4951c5ccfdc259c06d49c80e (diff)
downloadmarkdown-rs-ad1b3e62aba27afa19577b18d71b1c0ac4509847.tar.gz
markdown-rs-ad1b3e62aba27afa19577b18d71b1c0ac4509847.tar.bz2
markdown-rs-ad1b3e62aba27afa19577b18d71b1c0ac4509847.zip
Fix trailing whitespace around broken data
Closes GH-13. Closes GH-14.
Diffstat (limited to '')
-rw-r--r--src/construct/partial_whitespace.rs2
1 files changed, 2 insertions, 0 deletions
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() {