From 5d5e94567e7a87a3cefdda410e3bd9e36e26eca5 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 28 Oct 2022 18:30:46 +0200 Subject: Fix GFM autolink literals that end in in GFM table pipes Closes GH-20. Co-authored-by: Christian Murphy --- src/construct/gfm_autolink_literal.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/construct/gfm_autolink_literal.rs') diff --git a/src/construct/gfm_autolink_literal.rs b/src/construct/gfm_autolink_literal.rs index 0704da7..5438e36 100644 --- a/src/construct/gfm_autolink_literal.rs +++ b/src/construct/gfm_autolink_literal.rs @@ -470,8 +470,9 @@ pub fn path_inside(tokenizer: &mut Tokenizer) -> State { } _ => { // Source: . - if kind_after_index(tokenizer.parse_state.bytes, tokenizer.point.index) - == CharacterKind::Whitespace + if tokenizer.current.is_none() + || kind_after_index(tokenizer.parse_state.bytes, tokenizer.point.index) + == CharacterKind::Whitespace { State::Retry(StateName::GfmAutolinkLiteralPathAfter) } else { -- cgit