From c51784f08024e9dc3dc940a2a6b0db171f56aaa7 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 15 Jul 2022 11:48:20 +0200 Subject: Fix annoying bug around virtual spaces in containers --- src/content/document.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/content') diff --git a/src/content/document.rs b/src/content/document.rs index cd66909..e2c4f96 100644 --- a/src/content/document.rs +++ b/src/content/document.rs @@ -302,8 +302,7 @@ fn containers_after( tokenizer.interrupt = info.interrupt_before; // Define start. - let point = tokenizer.point.clone(); - tokenizer.define_skip(&point); + tokenizer.define_skip(tokenizer.point.clone(), tokenizer.index); flow_start(tokenizer, code, info) } @@ -491,7 +490,7 @@ fn line_end( // So, we’re at the end of a line, but we need to close the *previous* line. if !eof { println!("closing previous flow"); - tokenizer.define_skip(&tokenizer.point.clone()); + tokenizer.define_skip(tokenizer.point.clone(), tokenizer.index); let mut current_events = tokenizer.events.drain(info.index..).collect::>(); let next = info.next; info.next = Box::new(flow); // This is weird but Rust needs a function there. -- cgit