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_title.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 '')
-rw-r--r-- | src/construct/partial_title.rs | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/construct/partial_title.rs b/src/construct/partial_title.rs index 6303da8..852693a 100644 --- a/src/construct/partial_title.rs +++ b/src/construct/partial_title.rs @@ -56,7 +56,7 @@ enum Kind { /// ## Example /// /// ```markdown - /// [a] b (c) + /// (a) /// ``` Paren, /// In a double quoted (`"`) title. @@ -64,7 +64,7 @@ enum Kind { /// ## Example /// /// ```markdown - /// [a] b "c" + /// "a" /// ``` Double, /// In a single quoted (`'`) title. @@ -72,7 +72,7 @@ enum Kind { /// ## Example /// /// ```markdown - /// [a] b 'c' + /// 'a' /// ``` Single, } @@ -132,9 +132,8 @@ struct Info { /// Before a title. /// /// ```markdown -/// |"a" -/// |'a' -/// |(a) +/// > | "a" +/// ^ /// ``` pub fn start(tokenizer: &mut Tokenizer, code: Code, options: Options) -> StateFnResult { match code { @@ -159,9 +158,8 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code, options: Options) -> StateFn /// This is also used when at the closing marker. /// /// ```markdown -/// "|a" -/// '|a' -/// (|a) +/// > | "a" +/// ^ /// ``` fn begin(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { match code { @@ -182,10 +180,8 @@ fn begin(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { /// At something, before something else. /// /// ```markdown -/// "|a" -/// 'a|' -/// (a| -/// b) +/// > | "a" +/// ^ /// ``` fn at_break(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnResult { match code { @@ -222,7 +218,8 @@ fn at_break(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnRes /// In title text. /// /// ```markdown -/// "a|b" +/// > | "a" +/// ^ /// ``` fn title(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { match code { @@ -248,7 +245,8 @@ fn title(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { /// After `\`, in title text. /// /// ```markdown -/// "a\|"b" +/// > | "a\*b" +/// ^ /// ``` fn escape(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { match code { |