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/block_quote.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/block_quote.rs')
-rw-r--r-- | src/construct/block_quote.rs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/construct/block_quote.rs b/src/construct/block_quote.rs index 8e8c8b0..6c3f270 100644 --- a/src/construct/block_quote.rs +++ b/src/construct/block_quote.rs @@ -41,7 +41,8 @@ use crate::tokenizer::{Code, State, StateFnResult, Tokenizer}; /// Start of block quote. /// /// ```markdown -/// | > a +/// > | > a +/// ^ /// ``` pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { // To do: allow arbitrary when code (indented) is turned off. @@ -51,7 +52,8 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { /// Start of block quote, after whitespace, before `>`. /// /// ```markdown -/// |> a +/// > | > a +/// ^ /// ``` fn before(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { match code { @@ -66,8 +68,9 @@ fn before(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { /// Start of block quote continuation. /// /// ```markdown -/// > a -/// |> b +/// | > a +/// > | > b +/// ^ /// ``` pub fn cont(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { // To do: allow arbitrary when code (indented) is turned off. @@ -77,8 +80,9 @@ pub fn cont(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { /// After whitespace, before `>`. /// /// ```markdown -/// > a -/// |> b +/// | > a +/// > | > b +/// ^ /// ``` fn cont_before(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { match code { @@ -96,8 +100,10 @@ fn cont_before(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { /// After `>`, before optional whitespace. /// /// ```markdown -/// >| a -/// >|b +/// > | > a +/// ^ +/// > | >b +/// ^ /// ``` fn cont_after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { match code { |