diff options
Diffstat (limited to '')
-rw-r--r-- | readme.md | 6 | ||||
-rw-r--r-- | src/compiler.rs | 3 | ||||
-rw-r--r-- | src/content/flow.rs | 2 | ||||
-rw-r--r-- | src/parser.rs | 4 | ||||
-rw-r--r-- | src/subtokenize.rs | 2 | ||||
-rw-r--r-- | src/tokenizer.rs | 2 | ||||
-rw-r--r-- | src/util/edit_map.rs | 3 |
7 files changed, 8 insertions, 14 deletions
@@ -128,7 +128,8 @@ cargo doc --document-private-items #### Parse -- [ ] (2) attention/label interplay +- [ ] (2) Fix attention/label interplay +- [ ] (2) Fix resizing attention bug - [ ] (8) block quote\ test (`code_fenced`, `definition`, `code_indented`, `heading_atx`, `heading_setext`, `html_flow`, `misc_default_line_ending`, `thematic_break`) @@ -149,8 +150,9 @@ cargo doc --document-private-items #### Misc -- [ ] (3) Unicode punctuation - [ ] (1) use `char::REPLACEMENT_CHARACTER`? +- [ ] (3) Unicode punctuation +- [ ] (3) `nostd` - [ ] (3) Check subtokenizer unraveling is ok - [ ] (3) Remove splicing and cloning in subtokenizer - [ ] (3) Pass more references around diff --git a/src/compiler.rs b/src/compiler.rs index 061d3e3..b0061ce 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -1,4 +1,5 @@ //! Turn events into a string of HTML. +use std::collections::HashMap; use crate::constant::{SAFE_PROTOCOL_HREF, SAFE_PROTOCOL_SRC}; use crate::construct::character_reference::Kind as CharacterReferenceKind; use crate::tokenizer::{Code, Event, EventType, TokenType}; @@ -9,7 +10,6 @@ use crate::util::{ sanitize_uri::sanitize_uri, span::{codes as codes_from_span, from_exit_event, serialize}, }; -use std::collections::HashMap; /// Type of line endings in markdown. #[derive(Debug, Clone, PartialEq)] @@ -725,7 +725,6 @@ fn on_exit_autolink_email(context: &mut CompileContext) { &from_exit_event(context.events, context.index), false, ); - // To do: context.tag(format!( "<a href=\"{}\">", sanitize_uri( diff --git a/src/content/flow.rs b/src/content/flow.rs index 3ff948d..4a12e0f 100644 --- a/src/content/flow.rs +++ b/src/content/flow.rs @@ -19,6 +19,7 @@ //! * [HTML (flow)][crate::construct::html_flow] //! * [Thematic break][crate::construct::thematic_break] +use std::collections::HashSet; use crate::construct::{ blank_line::start as blank_line, code_fenced::start as code_fenced, code_indented::start as code_indented, definition::start as definition, @@ -33,7 +34,6 @@ use crate::util::{ normalize_identifier::normalize_identifier, span::{from_exit_event, serialize}, }; -use std::collections::HashSet; /// Turn `codes` as the flow content type into events. pub fn flow(parse_state: &mut ParseState, point: Point, index: usize) -> Vec<Event> { diff --git a/src/parser.rs b/src/parser.rs index f11f0d1..89a0de1 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,12 +1,10 @@ //! 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::flow::flow; use crate::tokenizer::{as_codes, Code, Event, Point}; -/// To do: could we do without `HashSet`, so we don’t need `std`? -use std::collections::HashSet; - /// Information needed, in all content types, when parsing markdown. /// /// Importantly, this contains a set of known definitions. diff --git a/src/subtokenize.rs b/src/subtokenize.rs index 92ada04..ad8aace 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -21,9 +21,7 @@ //! thus the whole document needs to be parsed up to the level of definitions, //! before any level that can include references can be parsed. -/// To do: could we do without `HashMap`, so we don’t need `std`? use std::collections::HashMap; - use crate::content::{string::start as string, text::start as text}; use crate::parser::ParseState; use crate::tokenizer::{ContentType, Event, EventType, State, StateFn, StateFnResult, Tokenizer}; diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 282c99f..9d870c9 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -11,9 +11,7 @@ //! [`attempt`]: Tokenizer::attempt //! [`check`]: Tokenizer::check -/// To do: could we do without `HashMap`, so we don’t need `std`? use std::collections::HashMap; - use crate::constant::TAB_SIZE; use crate::parser::ParseState; diff --git a/src/util/edit_map.rs b/src/util/edit_map.rs index 665367a..417f42b 100644 --- a/src/util/edit_map.rs +++ b/src/util/edit_map.rs @@ -8,9 +8,7 @@ //! And, in other cases, it’s needed to parse subcontent: pass some events //! through another tokenizer and inject the result. -/// To do: could we do without `HashMap`, so we don’t need `std`? use std::collections::HashMap; - use crate::tokenizer::Event; /// Shift `previous` and `next` links according to `jumps`. @@ -136,6 +134,7 @@ impl EditMap { } } +/// To do. fn add_impl( edit_map: &mut EditMap, index: usize, |