File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -470,8 +470,9 @@ pub fn path_inside(tokenizer: &mut Tokenizer) -> State {
470470 }
471471 _ => {
472472 // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L12>.
473- if kind_after_index ( tokenizer. parse_state . bytes , tokenizer. point . index )
474- == CharacterKind :: Whitespace
473+ if tokenizer. current . is_none ( )
474+ || kind_after_index ( tokenizer. parse_state . bytes , tokenizer. point . index )
475+ == CharacterKind :: Whitespace
475476 {
476477 State :: Retry ( StateName :: GfmAutolinkLiteralPathAfter )
477478 } else {
Original file line number Diff line number Diff line change @@ -98,5 +98,11 @@ fn fuzz() -> Result<(), String> {
9898 "8-d: autolink literals after tabs (GH-18)"
9999 ) ;
100100
101+ assert_eq ! (
102+ to_html_with_options( "| a |\n | - |\n | www.a|" , & Options :: gfm( ) ) ,
103+ Ok ( "<table>\n <thead>\n <tr>\n <th>a</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><a href=\" http://www.a\" >www.a</a></td>\n </tr>\n </tbody>\n </table>" . into( ) ) ,
104+ "9: autolink literals that end in table cell delimiter (GH-20)"
105+ ) ;
106+
101107 Ok ( ( ) )
102108}
You can’t perform that action at this time.
0 commit comments