diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-26 12:56:18 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-26 12:56:18 +0200 |
commit | db3c46a613a2b1c1671a38f87fdd268a12539c3f (patch) | |
tree | d84d1108198acb63a1f0be705e5ecef016d232b4 /src/construct | |
parent | ccf6775c848ba798c011654905269e3300e0079a (diff) | |
download | markdown-rs-db3c46a613a2b1c1671a38f87fdd268a12539c3f.tar.gz markdown-rs-db3c46a613a2b1c1671a38f87fdd268a12539c3f.tar.bz2 markdown-rs-db3c46a613a2b1c1671a38f87fdd268a12539c3f.zip |
Fix GFM tables interfering with other constructs
Closes GH-19.
Co-authored-by: Christian Murphy <christian.murphy.42@gmail.com>
Diffstat (limited to 'src/construct')
-rw-r--r-- | src/construct/gfm_table.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/construct/gfm_table.rs b/src/construct/gfm_table.rs index 58b7110..e055e1d 100644 --- a/src/construct/gfm_table.rs +++ b/src/construct/gfm_table.rs @@ -331,6 +331,7 @@ pub fn head_row_break(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { None => { tokenizer.tokenize_state.seen = false; + tokenizer.tokenize_state.size = 0; State::Nok } Some(b'\n') => { @@ -427,6 +428,7 @@ pub fn head_delimiter_start(tokenizer: &mut Tokenizer) -> State { tokenizer.interrupt = false; if tokenizer.lazy || tokenizer.pierce { + tokenizer.tokenize_state.size = 0; State::Nok } else { tokenizer.enter(Name::GfmTableDelimiterRow); |