diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-22 11:50:42 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-22 11:50:42 +0200 |
commit | 351c69644bdbdf52c95e322904273657892920b5 (patch) | |
tree | 114a93ff760b522232f9f7290bc6f632b7250095 /src/event.rs | |
parent | 5e6829c2fb79c2b7f59e38f924e2b2900c52b5d5 (diff) | |
download | markdown-rs-351c69644bdbdf52c95e322904273657892920b5.tar.gz markdown-rs-351c69644bdbdf52c95e322904273657892920b5.tar.bz2 markdown-rs-351c69644bdbdf52c95e322904273657892920b5.zip |
Add support for GFM strikethrough
Diffstat (limited to 'src/event.rs')
-rw-r--r-- | src/event.rs | 59 |
1 files changed, 57 insertions, 2 deletions
diff --git a/src/event.rs b/src/event.rs index 169fdb5..3c690e1 100644 --- a/src/event.rs +++ b/src/event.rs @@ -878,7 +878,6 @@ pub enum Name { /// ^ /// ``` EmphasisText, - // To do: sort. /// Whole frontmatter. /// /// ## Info @@ -1020,6 +1019,61 @@ pub enum Name { /// ^^^^^^^^^^^^^^^ /// ``` GfmAutolinkLiteralWww, + /// GFM: Strikethrough. + /// + /// ## Info + /// + /// * **Context**: + /// [text content][crate::construct::text] + /// * **Content model**: + /// [`GfmStrikethroughSequence`][Name::GfmStrikethroughSequence], + /// [`GfmStrikethroughText`][Name::GfmStrikethroughText] + /// * **Construct**: + /// [`attention`][crate::construct::attention] + /// + /// ## Example + /// + /// ```markdown + /// > | ~a~ + /// ^^^ + /// ``` + GfmStrikethrough, + /// Gfm: Strikethrough sequence. + /// + /// ## Info + /// + /// * **Context**: + /// [`GfmStrikethrough`][Name::GfmStrikethrough] + /// * **Content model**: + /// void + /// * **Construct**: + /// [`attention`][crate::construct::attention] + /// + /// ## Example + /// + /// ```markdown + /// > | ~a~ + /// ^ ^ + /// ``` + GfmStrikethroughSequence, + /// Gfm: Strikethrough text. + /// + /// ## Info + /// + /// * **Context**: + /// [`GfmStrikethrough`][Name::GfmStrikethrough] + /// * **Content model**: + /// [text content][crate::construct::text] + /// * **Construct**: + /// [`attention`][crate::construct::attention] + /// + /// ## Example + /// + /// ```markdown + /// > | ~a~ + /// ^ + /// ``` + GfmStrikethroughText, /// Whole hard break (escape). /// /// ## Info @@ -1977,7 +2031,7 @@ pub enum Name { } /// List of void events, used to make sure everything is working well. -pub const VOID_EVENTS: [Name; 46] = [ +pub const VOID_EVENTS: [Name; 47] = [ Name::AttentionSequence, Name::AutolinkEmail, Name::AutolinkMarker, @@ -2006,6 +2060,7 @@ pub const VOID_EVENTS: [Name; 46] = [ Name::GfmAutolinkLiteralEmail, Name::GfmAutolinkLiteralProtocol, Name::GfmAutolinkLiteralWww, + Name::GfmStrikethroughSequence, Name::FrontmatterSequence, Name::HardBreakEscape, Name::HardBreakTrailing, |