diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-01 11:00:39 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-01 11:00:39 +0200 |
commit | c3fb83f7aa0f2bc5699d3a050a40af64081f78c7 (patch) | |
tree | a2117a15d8ac0e9285ec14accd0a209f9ab6b32a /src/construct/definition.rs | |
parent | be62b2e29a61774100f676cfdd9b100cadf1905f (diff) | |
download | markdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.tar.gz markdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.tar.bz2 markdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.zip |
Refactor to clean and document `space_or_tab`
Diffstat (limited to 'src/construct/definition.rs')
-rw-r--r-- | src/construct/definition.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/construct/definition.rs b/src/construct/definition.rs index af94d12..2b3e4b3 100644 --- a/src/construct/definition.rs +++ b/src/construct/definition.rs @@ -96,7 +96,7 @@ use crate::construct::{ partial_destination::{start as destination, Options as DestinationOptions}, partial_label::{start as label, Options as LabelOptions}, - partial_space_or_tab::{space_or_tab, space_or_tab_one_line_ending}, + partial_space_or_tab::{space_or_tab, space_or_tab_eol}, partial_title::{start as title, Options as TitleOptions}, }; use crate::tokenizer::{Code, State, StateFnResult, TokenType, Tokenizer}; @@ -149,7 +149,7 @@ fn label_after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { tokenizer.exit(TokenType::DefinitionMarker); ( State::Fn(Box::new( - tokenizer.attempt_opt(space_or_tab_one_line_ending(), destination_before), + tokenizer.attempt_opt(space_or_tab_eol(), destination_before), )), None, ) @@ -233,7 +233,7 @@ fn after_whitespace(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { /// "c" /// ``` fn title_before(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { - tokenizer.go(space_or_tab_one_line_ending(), title_before_marker)(tokenizer, code) + tokenizer.go(space_or_tab_eol(), title_before_marker)(tokenizer, code) } /// Before a title, after a line ending. |