diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-26 10:57:20 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-26 11:00:51 +0200 |
commit | f41688c067be261279804b8ab3e04cd5d67f492f (patch) | |
tree | 7ddf8e3b4149de8c8425c8be3e6963c524ad4909 /src/event.rs | |
parent | 1e4c95079cb97b2b02440b21945c6d12741a7d19 (diff) | |
download | markdown-rs-f41688c067be261279804b8ab3e04cd5d67f492f.tar.gz markdown-rs-f41688c067be261279804b8ab3e04cd5d67f492f.tar.bz2 markdown-rs-f41688c067be261279804b8ab3e04cd5d67f492f.zip |
Add support for math (text)
Diffstat (limited to '')
-rw-r--r-- | src/event.rs | 66 |
1 files changed, 62 insertions, 4 deletions
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, |