From c9f75249b83839130ffbc3b6dd175b0e31008cb7 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 18 Jul 2022 13:27:16 +0200 Subject: Refactor examples of states --- src/construct/partial_destination.rs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/construct/partial_destination.rs') diff --git a/src/construct/partial_destination.rs b/src/construct/partial_destination.rs index daa968a..f5299d2 100644 --- a/src/construct/partial_destination.rs +++ b/src/construct/partial_destination.rs @@ -105,8 +105,10 @@ struct Info { /// Before a destination. /// /// ```markdown -/// | -/// |ab +/// > | +/// ^ +/// > | aa +/// ^ /// ``` pub fn start(tokenizer: &mut Tokenizer, code: Code, options: Options) -> StateFnResult { let info = Info { @@ -143,7 +145,8 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code, options: Options) -> StateFn /// After `<`, before an enclosed destination. /// /// ```markdown -/// <|ab> +/// > | +/// ^ /// ``` fn enclosed_before(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { if let Code::Char('>') = code { @@ -163,7 +166,8 @@ fn enclosed_before(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFn /// In an enclosed destination. /// /// ```markdown -/// +/// > | +/// ^ /// ``` fn enclosed(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { match code { @@ -192,7 +196,8 @@ fn enclosed(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult /// After `\`, in an enclosed destination. /// /// ```markdown -/// b> +/// > | +/// ^ /// ``` fn enclosed_escape(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { match code { @@ -207,7 +212,8 @@ fn enclosed_escape(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFn /// In a raw destination. /// /// ```markdown -/// a|b +/// > | aa +/// ^ /// ``` fn raw(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnResult { match code { @@ -265,7 +271,8 @@ fn raw(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnResult { /// After `\`, in a raw destination. /// /// ```markdown -/// a\|)b +/// > | a\*a +/// ^ /// ``` fn raw_escape(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { match code { -- cgit