aboutsummaryrefslogtreecommitdiffstats
path: root/src/content
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-15 11:48:20 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-15 11:48:23 +0200
commitc51784f08024e9dc3dc940a2a6b0db171f56aaa7 (patch)
tree1ea2029dd90ee59584d7db780c5b2fa29cc58e88 /src/content
parenta7a4d19fe3bc9e5e0c3218d9af41d9cee80e9374 (diff)
downloadmarkdown-rs-c51784f08024e9dc3dc940a2a6b0db171f56aaa7.tar.gz
markdown-rs-c51784f08024e9dc3dc940a2a6b0db171f56aaa7.tar.bz2
markdown-rs-c51784f08024e9dc3dc940a2a6b0db171f56aaa7.zip
Fix annoying bug around virtual spaces in containers
Diffstat (limited to 'src/content')
-rw-r--r--src/content/document.rs5
1 files changed, 2 insertions, 3 deletions
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::<Vec<_>>();
let next = info.next;
info.next = Box::new(flow); // This is weird but Rust needs a function there.