aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/link.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-20 18:14:15 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-20 18:14:15 +0200
commitc7a46d3cc22bd0b029ff97623cee31c6ec38fdfb (patch)
treecc8991179de6efc57fbefdcd5fbebaeb872e878e /src/util/link.rs
parent65dd765cceee8bdccc74c08066eec59a579a16b1 (diff)
downloadmarkdown-rs-c7a46d3cc22bd0b029ff97623cee31c6ec38fdfb.tar.gz
markdown-rs-c7a46d3cc22bd0b029ff97623cee31c6ec38fdfb.tar.bz2
markdown-rs-c7a46d3cc22bd0b029ff97623cee31c6ec38fdfb.zip
Add support for line endings in string
Diffstat (limited to 'src/util/link.rs')
-rw-r--r--src/util/link.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/link.rs b/src/util/link.rs
new file mode 100644
index 0000000..917ce4d
--- /dev/null
+++ b/src/util/link.rs
@@ -0,0 +1,8 @@
+//! To do.
+
+use crate::tokenizer::Event;
+
+pub fn link(events: &mut [Event], index: usize) {
+ events[index - 2].next = Some(index);
+ events[index].previous = Some(index - 2);
+}