diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-09-12 13:50:48 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-09-12 13:54:43 +0200 |
commit | 2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe (patch) | |
tree | e462579538174cb983dcc2be4b0418b8c5077050 /src/state.rs | |
parent | 640c103c0a2b92f7f2a49cfc0721577f40aa90e0 (diff) | |
download | markdown-rs-2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe.tar.gz markdown-rs-2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe.tar.bz2 markdown-rs-2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe.zip |
Fix whitespace in GFM footnote definition identifiers
* Fix a crash on line endings in footnote definitions
* Fix to match spaces and tabs in identifiers to `cmark-gfm`
* Fix order of one attribute
Diffstat (limited to 'src/state.rs')
-rw-r--r-- | src/state.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs index dcabbd7..1d15239 100644 --- a/src/state.rs +++ b/src/state.rs @@ -197,6 +197,9 @@ pub enum Name { GfmFootnoteDefinitionStart, GfmFootnoteDefinitionLabelBefore, + GfmFootnoteDefinitionLabelAtMarker, + GfmFootnoteDefinitionLabelInside, + GfmFootnoteDefinitionLabelEscape, GfmFootnoteDefinitionLabelAfter, GfmFootnoteDefinitionWhitespaceAfter, GfmFootnoteDefinitionContStart, @@ -652,6 +655,11 @@ pub fn call(tokenizer: &mut Tokenizer, name: Name) -> State { Name::GfmFootnoteDefinitionStart => construct::gfm_footnote_definition::start, Name::GfmFootnoteDefinitionLabelBefore => construct::gfm_footnote_definition::label_before, + Name::GfmFootnoteDefinitionLabelAtMarker => { + construct::gfm_footnote_definition::label_at_marker + } + Name::GfmFootnoteDefinitionLabelInside => construct::gfm_footnote_definition::label_inside, + Name::GfmFootnoteDefinitionLabelEscape => construct::gfm_footnote_definition::label_escape, Name::GfmFootnoteDefinitionLabelAfter => construct::gfm_footnote_definition::label_after, Name::GfmFootnoteDefinitionWhitespaceAfter => { construct::gfm_footnote_definition::whitespace_after |