aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/partial_destination.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-18 13:27:16 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-18 13:27:16 +0200
commitc9f75249b83839130ffbc3b6dd175b0e31008cb7 (patch)
tree55012a12979e5960845a611162a9a3e340627fa5 /src/construct/partial_destination.rs
parent2100b41ee330ef6b088b4d7efdf8ea589a650ceb (diff)
downloadmarkdown-rs-c9f75249b83839130ffbc3b6dd175b0e31008cb7.tar.gz
markdown-rs-c9f75249b83839130ffbc3b6dd175b0e31008cb7.tar.bz2
markdown-rs-c9f75249b83839130ffbc3b6dd175b0e31008cb7.zip
Refactor examples of states
Diffstat (limited to 'src/construct/partial_destination.rs')
-rw-r--r--src/construct/partial_destination.rs21
1 files changed, 14 insertions, 7 deletions
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>
-/// |ab
+/// > | <aa>
+/// ^
+/// > | 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>
+/// > | <aa>
+/// ^
/// ```
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
-/// <u|rl>
+/// > | <aa>
+/// ^
/// ```
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
-/// <a\|>b>
+/// > | <a\*a>
+/// ^
/// ```
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 {