aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/edit_map.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-07 11:34:20 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-07 11:34:20 +0200
commit6f33d0baae14d1413eff410117eb6a1e61a1b197 (patch)
tree9d4eaa9f644bfce7950842782684f24920c4703f /src/util/edit_map.rs
parent187d51acc953720d79f40e82aabe90ea5d58a8a3 (diff)
downloadmarkdown-rs-6f33d0baae14d1413eff410117eb6a1e61a1b197.tar.gz
markdown-rs-6f33d0baae14d1413eff410117eb6a1e61a1b197.tar.bz2
markdown-rs-6f33d0baae14d1413eff410117eb6a1e61a1b197.zip
Fix shifting jumps in tail of edit map
Diffstat (limited to 'src/util/edit_map.rs')
-rw-r--r--src/util/edit_map.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/edit_map.rs b/src/util/edit_map.rs
index ebc20b7..ae627c1 100644
--- a/src/util/edit_map.rs
+++ b/src/util/edit_map.rs
@@ -128,7 +128,9 @@ impl EditMap {
}
if start < events.len() {
- next_events.append(&mut events[start..].to_vec());
+ let append = &mut events[start..].to_vec();
+ shift_links(append, &jumps);
+ next_events.append(append);
}
next_events