diff options
-rw-r--r-- | src/tokenizer.rs | 606 |
1 files changed, 303 insertions, 303 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 950c935..17cf392 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -211,7 +211,7 @@ pub enum TokenType { /// ^ ^ ^ /// ``` CharacterReferenceMarker, - /// Character reference numeric marker. + /// Character reference hexadecimal numeric marker. /// /// ## Info /// @@ -226,10 +226,10 @@ pub enum TokenType { /// /// ```markdown /// > | a & b ≠ c 𝌆 d - /// ^ ^ + /// ^ /// ``` - CharacterReferenceMarkerNumeric, - /// Character reference hexadecimal numeric marker. + CharacterReferenceMarkerHexadecimal, + /// Character reference numeric marker. /// /// ## Info /// @@ -244,9 +244,9 @@ pub enum TokenType { /// /// ```markdown /// > | a & b ≠ c 𝌆 d - /// ^ + /// ^ ^ /// ``` - CharacterReferenceMarkerHexadecimal, + CharacterReferenceMarkerNumeric, /// Character reference closing marker. /// /// ## Info @@ -332,14 +332,14 @@ pub enum TokenType { /// ^^^ /// ```` CodeFencedFence, - /// A code (fenced) fence sequence. + /// A code (fenced) fence info word. /// /// ## Info /// /// * **Context**: - /// [`CodeFencedFenceSequence`][TokenType::CodeFencedFenceSequence] + /// [`CodeFencedFence`][TokenType::CodeFencedFence] /// * **Content model**: - /// void + /// [string content][crate::content::string] /// * **Construct**: /// [`code_fenced`][crate::construct::code_fenced] /// @@ -347,13 +347,12 @@ pub enum TokenType { /// /// ````markdown /// > | ```js - /// ^^^ + /// ^^ /// | console.log(1) - /// > | ``` - /// ^^^ + /// | ``` /// ```` - CodeFencedFenceSequence, - /// A code (fenced) fence info word. + CodeFencedFenceInfo, + /// A code (fenced) fence meta string. /// /// ## Info /// @@ -367,32 +366,33 @@ pub enum TokenType { /// ## Example /// /// ````markdown - /// > | ```js - /// ^^ + /// > | ```js highlight="1" + /// ^^^^^^^^^^^^^ /// | console.log(1) /// | ``` /// ```` - CodeFencedFenceInfo, - /// A code (fenced) fence meta string. + CodeFencedFenceMeta, + /// A code (fenced) fence sequence. /// /// ## Info /// /// * **Context**: - /// [`CodeFencedFence`][TokenType::CodeFencedFence] + /// [`CodeFencedFenceSequence`][TokenType::CodeFencedFenceSequence] /// * **Content model**: - /// [string content][crate::content::string] + /// void /// * **Construct**: /// [`code_fenced`][crate::construct::code_fenced] /// /// ## Example /// /// ````markdown - /// > | ```js highlight="1" - /// ^^^^^^^^^^^^^ + /// > | ```js + /// ^^^ /// | console.log(1) - /// | ``` + /// > | ``` + /// ^^^ /// ```` - CodeFencedFenceMeta, + CodeFencedFenceSequence, /// A code (fenced, indented) chunk. /// /// ## Info @@ -478,7 +478,7 @@ pub enum TokenType { /// ^ /// ``` CodeTextData, - /// Code (text) sequence. + /// Line ending in code (text). /// /// ## Info /// @@ -492,11 +492,12 @@ pub enum TokenType { /// ## Example /// /// ```markdown - /// > | a `b` c - /// ^ ^ + /// > | a `b␊ + /// ^ + /// | c` d /// ``` - CodeTextSequence, - /// Line ending in code (text). + CodeTextLineEnding, + /// Code (text) sequence. /// /// ## Info /// @@ -510,11 +511,10 @@ pub enum TokenType { /// ## Example /// /// ```markdown - /// > | a `b␊ - /// ^ - /// | c` d + /// > | a `b` c + /// ^ ^ /// ``` - CodeTextLineEnding, + CodeTextSequence, /// Data. /// /// ## Info @@ -557,90 +557,91 @@ pub enum TokenType { /// ^^^^^^^^^^ /// ``` Definition, - /// Whole definition label. + /// Whole definition destination. /// /// ## Info /// /// * **Context**: /// [`Definition`][TokenType::Definition] /// * **Content model**: - /// [`DefinitionLabelMarker`][TokenType::DefinitionLabelMarker], - /// [`DefinitionLabelString`][TokenType::DefinitionLabelString], - /// [`LineEnding`][TokenType::LineEnding], - /// [`SpaceOrTab`][TokenType::SpaceOrTab] + /// [`DefinitionDestinationLiteral`][TokenType::DefinitionDestinationLiteral], + /// [`DefinitionDestinationRaw`][TokenType::DefinitionDestinationRaw] /// * **Construct**: - /// [`label`][crate::construct::partial_label] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown /// > | [a]: b "c" - /// ^^^ + /// ^ + /// > | [a]: <b> "c" + /// ^^^ /// ``` - DefinitionLabel, - /// Definition label marker. + DefinitionDestination, + /// Definition destination literal. /// /// ## Info /// /// * **Context**: - /// [`DefinitionLabel`][TokenType::DefinitionLabel] + /// [`DefinitionDestination`][TokenType::DefinitionDestination] /// * **Content model**: - /// void + /// [`DefinitionDestinationLiteralMarker`][TokenType::DefinitionDestinationLiteralMarker], + /// [`DefinitionDestinationString`][TokenType::DefinitionDestinationString] /// * **Construct**: - /// [`label`][crate::construct::partial_label] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown - /// > | [a]: b "c" - /// ^ ^ + /// > | [a]: <b> "c" + /// ^^^ /// ``` - DefinitionLabelMarker, - /// Definition label data. + DefinitionDestinationLiteral, + /// Definition destination literal marker. /// /// ## Info /// /// * **Context**: - /// [`DefinitionLabel`][TokenType::DefinitionLabel] + /// [`DefinitionDestinationLiteral`][TokenType::DefinitionDestinationLiteral] /// * **Content model**: - /// [string content][crate::content::string] + /// void /// * **Construct**: - /// [`label`][crate::construct::partial_label] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown - /// > | [a]: b "c" - /// ^ + /// > | [a]: <b> "c" + /// ^ ^ /// ``` - DefinitionLabelString, - /// Definition marker. + DefinitionDestinationLiteralMarker, + /// Definition destination raw. /// /// ## Info /// /// * **Context**: - /// [`Definition`][TokenType::Definition] + /// [`DefinitionDestination`][TokenType::DefinitionDestination] /// * **Content model**: - /// void + /// [`DefinitionDestinationString`][TokenType::DefinitionDestinationString] /// * **Construct**: - /// [`definition`][crate::construct::definition] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown /// > | [a]: b "c" - /// ^ + /// ^ /// ``` - DefinitionMarker, - /// Whole definition destination. + DefinitionDestinationRaw, + /// Definition destination data. /// /// ## Info /// /// * **Context**: - /// [`Definition`][TokenType::Definition] - /// * **Content model**: /// [`DefinitionDestinationLiteral`][TokenType::DefinitionDestinationLiteral], /// [`DefinitionDestinationRaw`][TokenType::DefinitionDestinationRaw] + /// * **Content model**: + /// [string content][crate::content::string] /// * **Construct**: /// [`destination`][crate::construct::partial_destination] /// @@ -650,85 +651,84 @@ pub enum TokenType { /// > | [a]: b "c" /// ^ /// > | [a]: <b> "c" - /// ^^^ + /// ^ /// ``` - DefinitionDestination, - /// Definition destination literal. + DefinitionDestinationString, + /// Whole definition label. /// /// ## Info /// /// * **Context**: - /// [`DefinitionDestination`][TokenType::DefinitionDestination] + /// [`Definition`][TokenType::Definition] /// * **Content model**: - /// [`DefinitionDestinationLiteralMarker`][TokenType::DefinitionDestinationLiteralMarker], - /// [`DefinitionDestinationString`][TokenType::DefinitionDestinationString] + /// [`DefinitionLabelMarker`][TokenType::DefinitionLabelMarker], + /// [`DefinitionLabelString`][TokenType::DefinitionLabelString], + /// [`LineEnding`][TokenType::LineEnding], + /// [`SpaceOrTab`][TokenType::SpaceOrTab] /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`label`][crate::construct::partial_label] /// /// ## Example /// /// ```markdown - /// > | [a]: <b> "c" - /// ^^^ + /// > | [a]: b "c" + /// ^^^ /// ``` - DefinitionDestinationLiteral, - /// Definition destination literal marker. + DefinitionLabel, + /// Definition label marker. /// /// ## Info /// /// * **Context**: - /// [`DefinitionDestinationLiteral`][TokenType::DefinitionDestinationLiteral] + /// [`DefinitionLabel`][TokenType::DefinitionLabel] /// * **Content model**: /// void /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`label`][crate::construct::partial_label] /// /// ## Example /// /// ```markdown - /// > | [a]: <b> "c" - /// ^ ^ + /// > | [a]: b "c" + /// ^ ^ /// ``` - DefinitionDestinationLiteralMarker, - /// Definition destination raw. + DefinitionLabelMarker, + /// Definition label data. /// /// ## Info /// /// * **Context**: - /// [`DefinitionDestination`][TokenType::DefinitionDestination] + /// [`DefinitionLabel`][TokenType::DefinitionLabel] /// * **Content model**: - /// [`DefinitionDestinationString`][TokenType::DefinitionDestinationString] + /// [string content][crate::content::string] /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`label`][crate::construct::partial_label] /// /// ## Example /// /// ```markdown /// > | [a]: b "c" - /// ^ + /// ^ /// ``` - DefinitionDestinationRaw, - /// Definition destination data. + DefinitionLabelString, + /// Definition marker. /// /// ## Info /// /// * **Context**: - /// [`DefinitionDestinationLiteral`][TokenType::DefinitionDestinationLiteral], - /// [`DefinitionDestinationRaw`][TokenType::DefinitionDestinationRaw] + /// [`Definition`][TokenType::Definition] /// * **Content model**: - /// [string content][crate::content::string] + /// void /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`definition`][crate::construct::definition] /// /// ## Example /// /// ```markdown /// > | [a]: b "c" - /// ^ - /// > | [a]: <b> "c" - /// ^ + /// ^ /// ``` - DefinitionDestinationString, + DefinitionMarker, /// Whole definition title. /// /// ## Info @@ -1055,6 +1055,76 @@ pub enum TokenType { /// ^^^ /// ``` HtmlTextData, + /// Image. + /// + /// ## Info + /// + /// * **Context**: + /// [text content][crate::content::text] + /// * **Content model**: + /// [`Label`][TokenType::Label], + /// [`Resource`][TokenType::Resource], + /// [`Reference`][TokenType::Reference] + /// * **Construct**: + /// [`label_end`][crate::construct::label_end] + /// + /// ## Example + /// + /// ```markdown + /// > | a ![b] c + /// ^^^^ + /// > | a ![b][c] d + /// ^^^^^^^ + /// > | a ![b](c) d + /// ^^^^^^^ + /// ``` + Image, + /// Label. + /// + /// ## Info + /// + /// * **Context**: + /// [`Image`][TokenType::Image], + /// [`Link`][TokenType::Link] + /// * **Content model**: + /// [`LabelImage`][TokenType::LabelImage], + /// [`LabelLink`][TokenType::LabelLink], + /// [`LabelEnd`][TokenType::LabelEnd], + /// [`LabelText`][TokenType::LabelText] + /// * **Construct**: + /// [`label_end`][crate::construct::label_end] + /// + /// ## Example + /// + /// ```markdown + /// > | a [b] c + /// ^^^ + /// > | a ![b][c] d + /// ^^^^ + /// > | a [b](c) d + /// ^^^ + /// ``` + Label, + /// Label end. + /// + /// ## Info + /// + /// * **Context**: + /// [`Label`][TokenType::Label] + /// * **Content model**: + /// [`LabelMarker`][TokenType::LabelMarker] + /// * **Construct**: + /// [`label_end`][crate::construct::label_end] + /// + /// ## Example + /// + /// ```markdown + /// > | a ![b](c) d + /// ^ + /// > | a [b](c) d + /// ^ + /// ``` + LabelEnd, /// Label start (image). /// /// ## Info @@ -1134,372 +1204,341 @@ pub enum TokenType { /// ^ ^ /// ``` LabelMarker, - /// Label end. + /// Label text. /// /// ## Info /// /// * **Context**: /// [`Label`][TokenType::Label] /// * **Content model**: - /// [`LabelMarker`][TokenType::LabelMarker] + /// [text content][crate::content::text] /// * **Construct**: /// [`label_end`][crate::construct::label_end] /// /// ## Example /// /// ```markdown - /// > | a ![b](c) d - /// ^ - /// > | a [b](c) d + /// > | a [b] c + /// ^ + /// > | a ![b][c] d /// ^ + /// > | a [b](c) d + /// ^ /// ``` - LabelEnd, - /// Resource. + LabelText, + /// Line ending. /// /// ## Info /// /// * **Context**: - /// [`Image`][TokenType::Image], - /// [`Link`][TokenType::Link] + /// basically everywhere /// * **Content model**: - /// [`ResourceMarker`][TokenType::ResourceMarker], - /// [`ResourceDestination`][TokenType::ResourceDestination], - /// [`ResourceTitle`][TokenType::ResourceTitle], - /// [`SpaceOrTab`][TokenType::SpaceOrTab], - /// [`LineEnding`][TokenType::LineEnding] + /// void /// * **Construct**: - /// [`label_end`][crate::construct::label_end] + /// n/a /// /// ## Example /// /// ```markdown - /// > | a ![b](c "d") e - /// ^^^^^^^ - /// > | a [b](c) d - /// ^^^ + /// > | a␊ + /// ^ + /// | b /// ``` - Resource, - /// Resource marker. + LineEnding, + /// Link. /// /// ## Info /// /// * **Context**: - /// [`Resource`][TokenType::Resource] + /// [text content][crate::content::text] /// * **Content model**: - /// void + /// [`Label`][TokenType::Label], + /// [`Resource`][TokenType::Resource], + /// [`Reference`][TokenType::Reference] /// * **Construct**: /// [`label_end`][crate::construct::label_end] /// /// ## Example /// /// ```markdown - /// > | a ![b](c "d") e - /// ^ ^ + /// > | a [b] c + /// ^^^ + /// > | a [b][c] d + /// ^^^^^^ + /// > | a [b](c) d + /// ^^^^^^ /// ``` - ResourceMarker, - /// Resource destination. + Link, + /// Whole paragraph. /// /// ## Info /// /// * **Context**: - /// [`Resource`][TokenType::Resource] + /// [flow content][crate::content::flow] /// * **Content model**: - /// [`ResourceDestinationLiteral`][TokenType::ResourceDestinationLiteral], - /// [`ResourceDestinationRaw`][TokenType::ResourceDestinationRaw] + /// [text content][crate::content::text] /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`paragraph`][crate::construct::paragraph] /// /// ## Example /// /// ```markdown - /// > | a ![b](c "d") e - /// ^ + /// > | a b + /// ^^^ + /// > | c. + /// ^^ /// ``` - ResourceDestination, - /// Resource destination literal. + Paragraph, + /// Reference. /// /// ## Info /// /// * **Context**: - /// [`ResourceDestination`][TokenType::ResourceDestination] + /// [`Image`][TokenType::Image], + /// [`Link`][TokenType::Link] /// * **Content model**: - /// [`ResourceDestinationLiteralMarker`][TokenType::ResourceDestinationLiteralMarker], - /// [`ResourceDestinationString`][TokenType::ResourceDestinationString] + /// [`ReferenceMarker`][TokenType::ReferenceMarker], + /// [`ReferenceString`][TokenType::ReferenceString] /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`label`][crate::construct::partial_label] /// /// ## Example /// /// ```markdown - /// > | a ![b](<c> "d") e - /// ^^^ + /// > | a ![b][c] d + /// ^^^ /// ``` - ResourceDestinationLiteral, - /// Resource destination literal marker. + Reference, + /// Reference marker. /// /// ## Info /// /// * **Context**: - /// [`ResourceDestinationLiteral`][TokenType::ResourceDestinationLiteral] + /// [`Reference`][TokenType::Reference] /// * **Content model**: /// void /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`label`][crate::construct::partial_label] /// /// ## Example /// /// ```markdown - /// > | a ![b](<c> "d") e - /// ^ ^ + /// > | a ![b][c] d + /// ^ ^ /// ``` - ResourceDestinationLiteralMarker, - /// Resource destination raw. + ReferenceMarker, + /// Reference string. /// /// ## Info /// /// * **Context**: - /// [`ResourceDestination`][TokenType::ResourceDestination] + /// [`Reference`][TokenType::Reference] /// * **Content model**: - /// [`ResourceDestinationString`][TokenType::ResourceDestinationString] + /// [string content][crate::content::string] /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`label`][crate::construct::partial_label] /// /// ## Example /// /// ```markdown - /// > | a ![b](c "d") e + /// > | a ![b][c] d /// ^ /// ``` - ResourceDestinationRaw, - /// Resource destination raw. + ReferenceString, + /// Resource. /// /// ## Info /// /// * **Context**: - /// [`ResourceDestinationLiteral`][TokenType::ResourceDestinationLiteral], - /// [`ResourceDestinationRaw`][TokenType::ResourceDestinationRaw] + /// [`Image`][TokenType::Image], + /// [`Link`][TokenType::Link] /// * **Content model**: - /// [string content][crate::content::string] + /// [`ResourceMarker`][TokenType::ResourceMarker], + /// [`ResourceDestination`][TokenType::ResourceDestination], + /// [`ResourceTitle`][TokenType::ResourceTitle], + /// [`SpaceOrTab`][TokenType::SpaceOrTab], + /// [`LineEnding`][TokenType::LineEnding] /// * **Construct**: - /// [`destination`][crate::construct::partial_destination] + /// [`label_end`][crate::construct::label_end] /// /// ## Example /// /// ```markdown - /// > | a ![b](<c> "d") e - /// ^ /// > | a ![b](c "d") e - /// ^ + /// ^^^^^^^ + /// > | a [b](c) d + /// ^^^ /// ``` - ResourceDestinationString, - /// Resource title. + Resource, + /// Resource destination. /// /// ## Info /// /// * **Context**: /// [`Resource`][TokenType::Resource] /// * **Content model**: - /// [`ResourceTitleMarker`][TokenType::ResourceTitleMarker], - /// [`ResourceTitleString`][TokenType::ResourceTitleString] + /// [`ResourceDestinationLiteral`][TokenType::ResourceDestinationLiteral], + /// [`ResourceDestinationRaw`][TokenType::ResourceDestinationRaw] /// * **Construct**: - /// [`title`][crate::construct::partial_title] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown - /// > | a ![b](<c> "d") e - /// ^^^ + /// > | a ![b](c "d") e + /// ^ /// ``` - ResourceTitle, - /// Resource title marker. + ResourceDestination, + /// Resource destination literal. /// /// ## Info /// /// * **Context**: - /// [`ResourceTitle`][TokenType::ResourceTitle] + /// [`ResourceDestination`][TokenType::ResourceDestination] /// * **Content model**: - /// void + /// [`ResourceDestinationLiteralMarker`][TokenType::ResourceDestinationLiteralMarker], + /// [`ResourceDestinationString`][TokenType::ResourceDestinationString] /// * **Construct**: - /// [`title`][crate::construct::partial_title] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown /// > | a ![b](<c> "d") e - /// ^ ^ + /// ^^^ /// ``` - ResourceTitleMarker, - /// Resource title string. + ResourceDestinationLiteral, + /// Resource destination literal marker. /// /// ## Info /// /// * **Context**: - /// [`ResourceTitle`][TokenType::ResourceTitle] + /// [`ResourceDestinationLiteral`][TokenType::ResourceDestinationLiteral] /// * **Content model**: - /// [string content][crate::content::string] + /// void /// * **Construct**: - /// [`title`][crate::construct::partial_title] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown /// > | a ![b](<c> "d") e - /// ^ - /// ``` - ResourceTitleString, - /// Reference. - /// - /// ## Info - /// - /// * **Context**: - /// [`Image`][TokenType::Image], - /// [`Link`][TokenType::Link] - /// * **Content model**: - /// [`ReferenceMarker`][TokenType::ReferenceMarker], - /// [`ReferenceString`][TokenType::ReferenceString] - /// * **Construct**: - /// [`label`][crate::construct::partial_label] - /// - /// ## Example - /// - /// ```markdown - /// > | a ![b][c] d - /// ^^^ + /// ^ ^ /// ``` - Reference, - /// Reference marker. + ResourceDestinationLiteralMarker, + /// Resource destination raw. /// /// ## Info /// /// * **Context**: - /// [`Reference`][TokenType::Reference] + /// [`ResourceDestination`][TokenType::ResourceDestination] /// * **Content model**: - /// void + /// [`ResourceDestinationString`][TokenType::ResourceDestinationString] /// * **Construct**: - /// [`label`][crate::construct::partial_label] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown - /// > | a ![b][c] d - /// ^ ^ + /// > | a ![b](c "d") e + /// ^ /// ``` - ReferenceMarker, - /// Reference string. + ResourceDestinationRaw, + /// Resource destination raw. /// /// ## Info /// /// * **Context**: - /// [`Reference`][TokenType::Reference] + /// [`ResourceDestinationLiteral`][TokenType::ResourceDestinationLiteral], + /// [`ResourceDestinationRaw`][TokenType::ResourceDestinationRaw] /// * **Content model**: /// [string content][crate::content::string] /// * **Construct**: - /// [`label`][crate::construct::partial_label] + /// [`destination`][crate::construct::partial_destination] /// /// ## Example /// /// ```markdown - /// > | a ![b][c] d + /// > | a ![b](<c> "d") e + /// ^ + /// > | a ![b](c "d") e /// ^ /// ``` - ReferenceString, - /// Link. + ResourceDestinationString, + /// Resource marker. /// /// ## Info /// /// * **Context**: - /// [text content][crate::content::text] + /// [`Resource`][TokenType::Resource] /// * **Content model**: - /// [`Label`][TokenType::Label], - /// [`Resource`][TokenType::Resource], - /// [`Reference`][TokenType::Reference] + /// void /// * **Construct**: /// [`label_end`][crate::construct::label_end] /// /// ## Example /// /// ```markdown - /// > | a [b] c - /// ^^^ - /// > | a [b][c] d - /// ^^^^^^ - /// > | a [b](c) d - /// ^^^^^^ + /// > | a ![b](c "d") e + /// ^ ^ /// ``` - Link, - /// Image. + ResourceMarker, + /// Resource title. /// /// ## Info /// /// * **Context**: - /// [text content][crate::content::text] + /// [`Resource`][TokenType::Resource] /// * **Content model**: - /// [`Label`][TokenType::Label], - /// [`Resource`][TokenType::Resource], - /// [`Reference`][TokenType::Reference] + /// [`ResourceTitleMarker`][TokenType::ResourceTitleMarker], + /// [`ResourceTitleString`][TokenType::ResourceTitleString] /// * **Construct**: - /// [`label_end`][crate::construct::label_end] + /// [`title`][crate::construct::partial_title] /// /// ## Example /// /// ```markdown - /// > | a ![b] c - /// ^^^^ - /// > | a ![b][c] d - /// ^^^^^^^ - /// > | a ![b](c) d - /// ^^^^^^^ + /// > | a ![b](<c> "d") e + /// ^^^ /// ``` - Image, - /// Label. + ResourceTitle, + /// Resource title marker. /// /// ## Info /// /// * **Context**: - /// [`Image`][TokenType::Image], - /// [`Link`][TokenType::Link] + /// [`ResourceTitle`][TokenType::ResourceTitle] /// * **Content model**: - /// [`LabelImage`][TokenType::LabelImage], - /// [`LabelLink`][TokenType::LabelLink], - /// [`LabelEnd`][TokenType::LabelEnd], - /// [`LabelText`][TokenType::LabelText] + /// void /// * **Construct**: - /// [`label_end`][crate::construct::label_end] + /// [`title`][crate::construct::partial_title] /// /// ## Example /// /// ```markdown - /// > | a [b] c - /// ^^^ - /// > | a ![b][c] d - /// ^^^^ - /// > | a [b](c) d - /// ^^^ + /// > | a ![b](<c> "d") e + /// ^ ^ /// ``` - Label, - /// Label text. + ResourceTitleMarker, + /// Resource title string. /// /// ## Info /// /// * **Context**: - /// [`Label`][TokenType::Label] + /// [`ResourceTitle`][TokenType::ResourceTitle] /// * **Content model**: - /// [text content][crate::content::text] + /// [string content][crate::content::string] /// * **Construct**: - /// [`label_end`][crate::construct::label_end] + /// [`title`][crate::construct::partial_title] /// /// ## Example /// /// ```markdown - /// > | a [b] c - /// ^ - /// > | a ![b][c] d - /// ^ - /// > | a [b](c) d - /// ^ + /// > | a ![b](<c> "d") e + /// ^ /// ``` - LabelText, - /// Line ending. + ResourceTitleString, + /// SpaceOrTab. /// /// ## Info /// @@ -1513,31 +1552,10 @@ pub enum TokenType { /// ## Example /// /// ```markdown - /// > | a␊ - /// ^ - /// | b - /// ``` - LineEnding, - /// Whole paragraph. - /// - /// ## Info - /// - /// * **Context**: - /// [flow content][crate::content::flow] - /// * **Content model**: - /// [text content][crate::content::text] - /// * **Construct**: - /// [`paragraph`][crate::construct::paragraph] - /// - /// ## Example - /// - /// ```markdown - /// > | a b - /// ^^^ - /// > | c. - /// ^^ + /// > | ␠* * *␠ + /// ^ ^ ^ ^ /// ``` - Paragraph, + SpaceOrTab, /// Whole thematic break. /// /// ## Info @@ -1575,24 +1593,6 @@ pub enum TokenType { /// ^ ^ ^ /// ``` ThematicBreakSequence, - /// SpaceOrTab. - /// - /// ## Info - /// - /// * **Context**: - /// basically everywhere - /// * **Content model**: - /// void - /// * **Construct**: - /// n/a - /// - /// ## Example - /// - /// ```markdown - /// > | ␠* * *␠ - /// ^ ^ ^ ^ - /// ``` - SpaceOrTab, } /// To do |