aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/label_end.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-01 11:00:39 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-01 11:00:39 +0200
commitc3fb83f7aa0f2bc5699d3a050a40af64081f78c7 (patch)
treea2117a15d8ac0e9285ec14accd0a209f9ab6b32a /src/construct/label_end.rs
parentbe62b2e29a61774100f676cfdd9b100cadf1905f (diff)
downloadmarkdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.tar.gz
markdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.tar.bz2
markdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.zip
Refactor to clean and document `space_or_tab`
Diffstat (limited to '')
-rw-r--r--src/construct/label_end.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/construct/label_end.rs b/src/construct/label_end.rs
index 0da12b8..6901cb3 100644
--- a/src/construct/label_end.rs
+++ b/src/construct/label_end.rs
@@ -150,7 +150,7 @@ use crate::constant::RESOURCE_DESTINATION_BALANCE_MAX;
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_one_line_ending,
+ partial_space_or_tab::space_or_tab_eol,
partial_title::{start as title, Options as TitleOptions},
};
use crate::tokenizer::{
@@ -561,7 +561,7 @@ fn resource(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
/// [a](|b) c
/// ```
fn resource_start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
- tokenizer.attempt_opt(space_or_tab_one_line_ending(), resource_open)(tokenizer, code)
+ tokenizer.attempt_opt(space_or_tab_eol(), resource_open)(tokenizer, code)
}
/// At the start of a resource, after optional whitespace.
@@ -599,7 +599,7 @@ fn resource_open(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
/// [a](b| "c") d
/// ```
fn destination_after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
- tokenizer.attempt(space_or_tab_one_line_ending(), |ok| {
+ tokenizer.attempt(space_or_tab_eol(), |ok| {
Box::new(if ok { resource_between } else { resource_end })
})(tokenizer, code)
}
@@ -636,7 +636,7 @@ fn resource_between(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
/// [a](b "c"|) d
/// ```
fn title_after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
- tokenizer.attempt_opt(space_or_tab_one_line_ending(), resource_end)(tokenizer, code)
+ tokenizer.attempt_opt(space_or_tab_eol(), resource_end)(tokenizer, code)
}
/// In a resource, at the `)`.