yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

Fix #335 #338

Open tenevdev opened 1 year ago

tenevdev commented 1 year ago

I think this fixes the issue described in #335 when using both linkify and typographer. I intend my contribution to be similar to the behaviour of https://github.com/github/cmark-gfm/blob/6a6e335709ef68cf2c616eeaf61b09ed4c654669/extensions/autolink.c#L58

However, when using just linkify, it doesn't trigger on quotes so there will be no link created. This seems inconsistent to me but it was not part of the original issue so I'm just mentioning it.

yuin commented 1 year ago

Official GFM spec https://github.github.com/gfm/#example-624 says:

Trailing punctuation (specifically, ?, !, ., ,, :, *, _, and ~) will not be considered part of the autolink, though they may be included in the interior of the link:

' and " is not included the list.

yuin commented 1 year ago

https://github.com/github/cmark-gfm/issues/297

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.