diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-05 13:31:46 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-05 13:31:46 +0200 |
commit | f2d62d446a7b1e03ef14b580e2aca0fad8aa23ef (patch) | |
tree | b2a837d99cb0e4a4de0bfd82051e10a2db8c6456 /src/subtokenize.rs | |
parent | fd860a975b84da9a79abfa247787e6adbd5ea34c (diff) | |
download | markdown-rs-f2d62d446a7b1e03ef14b580e2aca0fad8aa23ef.tar.gz markdown-rs-f2d62d446a7b1e03ef14b580e2aca0fad8aa23ef.tar.bz2 markdown-rs-f2d62d446a7b1e03ef14b580e2aca0fad8aa23ef.zip |
Refactor to do some to dos
Diffstat (limited to '')
-rw-r--r-- | src/subtokenize.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/subtokenize.rs b/src/subtokenize.rs index f3e9ae0..6b0460c 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -36,7 +36,7 @@ pub fn link(events: &mut [Event], index: usize) { link_to(events, index - 2, index); } -/// To do +/// Link two arbitrary [`Event`][]s together. pub fn link_to(events: &mut [Event], pevious: usize, next: usize) { let prev = &mut events[pevious]; assert!( @@ -111,7 +111,7 @@ pub fn subtokenize(mut events: Vec<Event>, parse_state: &ParseState) -> (Vec<Eve ends.push(span.end_index); if enter.previous != None { - tokenizer.define_skip(&enter.point, span.start_index); + tokenizer.define_skip(&enter.point); } let func: Box<StateFn> = match result.0 { @@ -143,7 +143,6 @@ pub fn subtokenize(mut events: Vec<Event>, parse_state: &ParseState) -> (Vec<Eve // Find the first event that starts after the end we’re looking // for. - // To do: is this logic correct? if subevent.event_type == EventType::Enter && subevent.index >= ends[end_index] { let link = index_opt.unwrap(); |