From f41688c067be261279804b8ab3e04cd5d67f492f Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 26 Aug 2022 10:57:20 +0200 Subject: Add support for math (text) --- src/event.rs | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 4 deletions(-) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index 3b805e5..869f2e8 100644 --- a/src/event.rs +++ b/src/event.rs @@ -507,7 +507,7 @@ pub enum Name { /// [`CodeTextSequence`][Name::CodeTextSequence], /// [`LineEnding`][Name::LineEnding] /// * **Construct**: - /// [`code_text`][crate::construct::code_text] + /// [`raw_text`][crate::construct::raw_text] /// /// ## Example /// @@ -525,7 +525,7 @@ pub enum Name { /// * **Content model**: /// void /// * **Construct**: - /// [`code_text`][crate::construct::code_text] + /// [`raw_text`][crate::construct::raw_text] /// /// ## Example /// @@ -543,7 +543,7 @@ pub enum Name { /// * **Content model**: /// void /// * **Construct**: - /// [`code_text`][crate::construct::code_text] + /// [`raw_text`][crate::construct::raw_text] /// /// ## Example /// @@ -1889,6 +1889,62 @@ pub enum Name { /// ^^^ /// ``` ListUnordered, + /// Whole math (text). + /// + /// ## Info + /// + /// * **Context**: + /// [text content][crate::construct::text] + /// * **Content model**: + /// [`MathTextData`][Name::MathTextData], + /// [`MathTextSequence`][Name::MathTextSequence], + /// [`LineEnding`][Name::LineEnding] + /// * **Construct**: + /// [`raw_text`][crate::construct::raw_text] + /// + /// ## Example + /// + /// ```markdown + /// > | a $b$ c + /// ^^^ + /// ``` + MathText, + /// Math (text) data. + /// + /// ## Info + /// + /// * **Context**: + /// [`MathText`][Name::MathText], + /// * **Content model**: + /// void + /// * **Construct**: + /// [`raw_text`][crate::construct::raw_text] + /// + /// ## Example + /// + /// ```markdown + /// > | a `b` c + /// ^ + /// ``` + MathTextData, + /// Math (text) sequence. + /// + /// ## Info + /// + /// * **Context**: + /// [`MathText`][Name::MathText], + /// * **Content model**: + /// void + /// * **Construct**: + /// [`raw_text`][crate::construct::raw_text] + /// + /// ## Example + /// + /// ```markdown + /// > | a $b$ c + /// ^ ^ + /// ``` + MathTextSequence, /// Whole paragraph. /// /// ## Info @@ -2271,7 +2327,7 @@ pub enum Name { } /// List of void events, used to make sure everything is working well. -pub const VOID_EVENTS: [Name; 53] = [ +pub const VOID_EVENTS: [Name; 55] = [ Name::AttentionSequence, Name::AutolinkEmail, Name::AutolinkMarker, @@ -2319,6 +2375,8 @@ pub const VOID_EVENTS: [Name; 53] = [ Name::LineEnding, Name::ListItemMarker, Name::ListItemValue, + Name::MathTextData, + Name::MathTextSequence, Name::ReferenceMarker, Name::ResourceMarker, Name::ResourceTitleMarker, -- cgit