diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-13 11:26:22 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-13 11:26:22 +0200 |
commit | fb185e801e7d2002948d0b4e91ee06767e13ed00 (patch) | |
tree | 8e0ea5d1b92e794cfa7efbcab7b98d81e13b862f /src/content/document.rs | |
parent | ad8eac98c1468b30c17c339e79b84c37a7b15517 (diff) | |
download | markdown-rs-fb185e801e7d2002948d0b4e91ee06767e13ed00.tar.gz markdown-rs-fb185e801e7d2002948d0b4e91ee06767e13ed00.tar.bz2 markdown-rs-fb185e801e7d2002948d0b4e91ee06767e13ed00.zip |
Fix lists in lists and some other bugs
Diffstat (limited to 'src/content/document.rs')
-rw-r--r-- | src/content/document.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/content/document.rs b/src/content/document.rs index 7f8a116..b29e4b9 100644 --- a/src/content/document.rs +++ b/src/content/document.rs @@ -275,7 +275,6 @@ fn exit_containers( let mut index = 0; while index < token_types.len() { let token_type = &token_types[index]; - println!("creating exit: {:?}", token_type); exits.push(Event { event_type: EventType::Exit, @@ -295,14 +294,13 @@ fn exit_containers( if !exits.is_empty() { let before = if before { 1 } else { 0 }; let mut index = info.inject.len() - 1; - println!("inject: {:?} {:?}", info.inject.len() - 1, before); - if before >= index { + if before > index { // To do: maybe, if this branch happens, it’s a bug? println!("inject:0: {:?}", index); index = 0; } else { index -= before; - println!("set: {:?}", index); + println!("inject:set: {:?}", index); } info.inject[index].1.append(&mut exits); } @@ -435,6 +433,8 @@ fn flow_end( line_index += 1; let add = info.inject[line_index].0.clone(); if !add.is_empty() { + // No longer empty. + first_line_ending_in_run = None; map.add(index + 1, 0, add); } } |