aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-07 18:16:23 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-07 18:16:23 +0200
commit2aa90a60a45566ebfdb5252a77bb318810cffe0c (patch)
treede5fe00ddfa1daae9422d134b8da4bead6de9694 /src/util
parent1c3b6e900d9b23e8a1f34f1c5b7b9657bd7c1451 (diff)
downloadmarkdown-rs-2aa90a60a45566ebfdb5252a77bb318810cffe0c.tar.gz
markdown-rs-2aa90a60a45566ebfdb5252a77bb318810cffe0c.tar.bz2
markdown-rs-2aa90a60a45566ebfdb5252a77bb318810cffe0c.zip
Fix some small to dos
Diffstat (limited to 'src/util')
-rw-r--r--src/util/skip.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/skip.rs b/src/util/skip.rs
index 2c4198a..a8e4cfe 100644
--- a/src/util/skip.rs
+++ b/src/util/skip.rs
@@ -1,16 +1,18 @@
+//! Utilities to deal with lists of events.
+
use crate::tokenizer::{Event, TokenType};
-/// To do.
+/// Skip from `index`, optionally past `token_types`.
pub fn opt(events: &[Event], index: usize, token_types: &[TokenType]) -> usize {
skip_opt_with_direction(events, index, token_types, true)
}
-/// To do.
+/// Skip from `index`, optionally past `token_types`, backwards.
pub fn opt_back(events: &[Event], index: usize, token_types: &[TokenType]) -> usize {
skip_opt_with_direction(events, index, token_types, false)
}
-/// To do.
+/// Skip internals.
fn skip_opt_with_direction(
events: &[Event],
index: usize,