diff options
Diffstat (limited to '')
-rw-r--r-- | src/construct/gfm_table.rs | 2 | ||||
-rw-r--r-- | tests/fuzz.rs | 6 |
2 files changed, 8 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); diff --git a/tests/fuzz.rs b/tests/fuzz.rs index 72f365e..1e80701 100644 --- a/tests/fuzz.rs +++ b/tests/fuzz.rs @@ -68,5 +68,11 @@ fn fuzz() -> Result<(), String> { "6-b: container close after unclosed fenced code, with eol (list, GH-16)" ); + assert_eq!( + to_html_with_options("> x\n``", &Options::gfm()), + Ok("<blockquote>\n<p>x</p>\n</blockquote>\n<p>``</p>".into()), + "7: lazy container lines almost starting fenced code (GH-19)" + ); + Ok(()) } |