diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-31 16:50:20 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-31 16:50:20 +0200 |
commit | b1590a4fb0c28fdb6af866ea79c186ea57284493 (patch) | |
tree | 61264dc36135e7dae34a04992a99b9f3f71e7b8e /src/state.rs | |
parent | 670f1d82e01ea2394b21d7d1857f41bdc67b3fce (diff) | |
download | markdown-rs-b1590a4fb0c28fdb6af866ea79c186ea57284493.tar.gz markdown-rs-b1590a4fb0c28fdb6af866ea79c186ea57284493.tar.bz2 markdown-rs-b1590a4fb0c28fdb6af866ea79c186ea57284493.zip |
Add support for GFM tables
Diffstat (limited to 'src/state.rs')
-rw-r--r-- | src/state.rs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs index a42e802..5013ec8 100644 --- a/src/state.rs +++ b/src/state.rs @@ -123,6 +123,7 @@ pub enum Name { DocumentFlowEnd, FlowStart, + FlowBeforeGfmTable, FlowBeforeCodeIndented, FlowBeforeRaw, FlowBeforeHtml, @@ -309,6 +310,28 @@ pub enum Name { StringBefore, StringBeforeData, + GfmTableStart, + GfmTableHeadRowBefore, + GfmTableHeadRowStart, + GfmTableHeadRowBreak, + GfmTableHeadRowData, + GfmTableHeadRowEscape, + GfmTableHeadDelimiterStart, + GfmTableHeadDelimiterBefore, + GfmTableHeadDelimiterCellBefore, + GfmTableHeadDelimiterValueBefore, + GfmTableHeadDelimiterLeftAlignmentAfter, + GfmTableHeadDelimiterFiller, + GfmTableHeadDelimiterRightAlignmentAfter, + GfmTableHeadDelimiterCellAfter, + GfmTableHeadDelimiterNok, + + GfmTableBodyRowBefore, + GfmTableBodyRowStart, + GfmTableBodyRowBreak, + GfmTableBodyRowData, + GfmTableBodyRowEscape, + TextStart, TextBefore, TextBeforeHtml, @@ -445,6 +468,7 @@ pub fn call(tokenizer: &mut Tokenizer, name: Name) -> State { Name::DocumentFlowInside => construct::document::flow_inside, Name::FlowStart => construct::flow::start, + Name::FlowBeforeGfmTable => construct::flow::before_gfm_table, Name::FlowBeforeCodeIndented => construct::flow::before_code_indented, Name::FlowBeforeRaw => construct::flow::before_raw, Name::FlowBeforeHtml => construct::flow::before_html, @@ -662,6 +686,33 @@ pub fn call(tokenizer: &mut Tokenizer, name: Name) -> State { Name::StringBefore => construct::string::before, Name::StringBeforeData => construct::string::before_data, + Name::GfmTableStart => construct::gfm_table::start, + Name::GfmTableHeadRowBefore => construct::gfm_table::head_row_before, + Name::GfmTableHeadRowStart => construct::gfm_table::head_row_start, + Name::GfmTableHeadRowBreak => construct::gfm_table::head_row_break, + Name::GfmTableHeadRowData => construct::gfm_table::head_row_data, + Name::GfmTableHeadRowEscape => construct::gfm_table::head_row_escape, + + Name::GfmTableHeadDelimiterStart => construct::gfm_table::head_delimiter_start, + Name::GfmTableHeadDelimiterBefore => construct::gfm_table::head_delimiter_before, + Name::GfmTableHeadDelimiterCellBefore => construct::gfm_table::head_delimiter_cell_before, + Name::GfmTableHeadDelimiterValueBefore => construct::gfm_table::head_delimiter_value_before, + Name::GfmTableHeadDelimiterLeftAlignmentAfter => { + construct::gfm_table::head_delimiter_left_alignment_after + } + Name::GfmTableHeadDelimiterFiller => construct::gfm_table::head_delimiter_filler, + Name::GfmTableHeadDelimiterRightAlignmentAfter => { + construct::gfm_table::head_delimiter_right_alignment_after + } + Name::GfmTableHeadDelimiterCellAfter => construct::gfm_table::head_delimiter_cell_after, + Name::GfmTableHeadDelimiterNok => construct::gfm_table::head_delimiter_nok, + + Name::GfmTableBodyRowBefore => construct::gfm_table::body_row_before, + Name::GfmTableBodyRowStart => construct::gfm_table::body_row_start, + Name::GfmTableBodyRowBreak => construct::gfm_table::body_row_break, + Name::GfmTableBodyRowData => construct::gfm_table::body_row_data, + Name::GfmTableBodyRowEscape => construct::gfm_table::body_row_escape, + Name::TextStart => construct::text::start, Name::TextBefore => construct::text::before, Name::TextBeforeHtml => construct::text::before_html, |