aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/gfm_autolink_literal.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/construct/gfm_autolink_literal.rs')
-rw-r--r--src/construct/gfm_autolink_literal.rs5
1 files changed, 3 insertions, 2 deletions
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: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L12>.
- 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 {