diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-07 18:16:23 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-07 18:16:23 +0200 |
commit | 2aa90a60a45566ebfdb5252a77bb318810cffe0c (patch) | |
tree | de5fe00ddfa1daae9422d134b8da4bead6de9694 | |
parent | 1c3b6e900d9b23e8a1f34f1c5b7b9657bd7c1451 (diff) | |
download | markdown-rs-2aa90a60a45566ebfdb5252a77bb318810cffe0c.tar.gz markdown-rs-2aa90a60a45566ebfdb5252a77bb318810cffe0c.tar.bz2 markdown-rs-2aa90a60a45566ebfdb5252a77bb318810cffe0c.zip |
Fix some small to dos
Diffstat (limited to '')
-rw-r--r-- | src/construct/html_flow.rs | 4 | ||||
-rw-r--r-- | src/parser.rs | 3 | ||||
-rw-r--r-- | src/tokenizer.rs | 3 | ||||
-rw-r--r-- | src/util/skip.rs | 8 |
4 files changed, 10 insertions, 8 deletions
diff --git a/src/construct/html_flow.rs b/src/construct/html_flow.rs index 229b0ef..be7a3a9 100644 --- a/src/construct/html_flow.rs +++ b/src/construct/html_flow.rs @@ -105,6 +105,8 @@ use crate::construct::{ use crate::tokenizer::{Code, State, StateFnResult, TokenType, Tokenizer}; use crate::util::codes::{parse, serialize}; +// To do: mark as concrete (block quotes or lists can’t “pierce” into HTML). + /// Kind of HTML (flow). #[derive(Debug, PartialEq)] enum Kind { @@ -194,8 +196,6 @@ struct Info { quote: Option<QuoteKind>, } -// To do: mark as concrete (block quotes or lists can’t “pierce” into HTML). - /// Start of HTML (flow), before optional whitespace. /// /// ```markdown diff --git a/src/parser.rs b/src/parser.rs index b1fd4fd..725f326 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,10 +1,9 @@ //! Turn a string of markdown into events. -use std::collections::HashSet; -// To do: this should start with `containers`, when they’re done. use crate::content::document::document; use crate::tokenizer::{Code, Event, Point}; use crate::util::codes::parse as parse_codes; +use std::collections::HashSet; /// Information needed, in all content types, when parsing markdown. /// diff --git a/src/tokenizer.rs b/src/tokenizer.rs index c1a23eb..6198776 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -2190,7 +2190,8 @@ impl<'a> Tokenizer<'a> { ) } - /// To do. + /// Like `go`, but this lets you *hijack* back to some other state after a + /// certain code. #[allow(clippy::unused_self)] pub fn go_until( &mut self, 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, |