aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/link.rs8
-rw-r--r--src/util/mod.rs1
2 files changed, 9 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);
+}
diff --git a/src/util/mod.rs b/src/util/mod.rs
index c3db267..5439c62 100644
--- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ -2,5 +2,6 @@
pub mod decode_character_reference;
pub mod encode;
+pub mod link;
pub mod sanitize_uri;
pub mod span;