diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-18 13:27:16 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-18 13:27:16 +0200 |
commit | c9f75249b83839130ffbc3b6dd175b0e31008cb7 (patch) | |
tree | 55012a12979e5960845a611162a9a3e340627fa5 /src/construct/partial_space_or_tab.rs | |
parent | 2100b41ee330ef6b088b4d7efdf8ea589a650ceb (diff) | |
download | markdown-rs-c9f75249b83839130ffbc3b6dd175b0e31008cb7.tar.gz markdown-rs-c9f75249b83839130ffbc3b6dd175b0e31008cb7.tar.bz2 markdown-rs-c9f75249b83839130ffbc3b6dd175b0e31008cb7.zip |
Refactor examples of states
Diffstat (limited to 'src/construct/partial_space_or_tab.rs')
-rw-r--r-- | src/construct/partial_space_or_tab.rs | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/construct/partial_space_or_tab.rs b/src/construct/partial_space_or_tab.rs index 78477de..9ee8b6c 100644 --- a/src/construct/partial_space_or_tab.rs +++ b/src/construct/partial_space_or_tab.rs @@ -129,7 +129,8 @@ pub fn space_or_tab_eol_with_options(options: EolOptions) -> Box<StateFn> { /// Before `space_or_tab`. /// /// ```markdown -/// alpha| bravo +/// > | a␠␠b +/// ^ /// ``` fn start(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnResult { match code { @@ -159,8 +160,8 @@ fn start(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnResult /// In `space_or_tab`. /// /// ```markdown -/// alpha |bravo -/// alpha | bravo +/// > | a␠␠b +/// ^ /// ``` fn inside(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnResult { match code { @@ -186,13 +187,9 @@ fn inside(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnResul /// `space_or_tab_eol`: after optionally first `space_or_tab`. /// /// ```markdown -/// alpha | -/// bravo -/// ``` -/// -/// ```markdown -/// alpha| -/// bravo +/// > | a +/// ^ +/// | b /// ``` fn after_space_or_tab(tokenizer: &mut Tokenizer, code: Code, mut info: EolInfo) -> StateFnResult { match code { @@ -218,13 +215,9 @@ fn after_space_or_tab(tokenizer: &mut Tokenizer, code: Code, mut info: EolInfo) /// `space_or_tab_eol`: after eol. /// /// ```markdown -/// alpha -/// |bravo -/// ``` -/// -/// ```markdown -/// alpha -/// |bravo +/// | a +/// > | b +/// ^ /// ``` #[allow(clippy::needless_pass_by_value)] fn after_eol(tokenizer: &mut Tokenizer, code: Code, info: EolInfo) -> StateFnResult { @@ -243,13 +236,9 @@ fn after_eol(tokenizer: &mut Tokenizer, code: Code, info: EolInfo) -> StateFnRes /// `space_or_tab_eol`: after more (optional) `space_or_tab`. /// /// ```markdown -/// alpha -/// |bravo -/// ``` -/// -/// ```markdown -/// alpha -/// |bravo +/// | a +/// > | b +/// ^ /// ``` fn after_more_space_or_tab(_tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { // Blank line not allowed. |