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

Linkify of GitHub Flavored Markdown not detecting inline formatting #235

Closed nerg4l closed 3 years ago

nerg4l commented 3 years ago

Please answer the following before submitting your issue:

  1. What version of goldmark are you using? : v1.4.0
  2. What version of Go are you using? : 1.16.4
  3. What operating system and processor architecture are you using? : Windows 10 Pro N 20H2 64 bit
  4. What did you do? : Rendered links surrounded with inline formatting.
  5. What did you expect to see? : Link formatted with strikethrough/bold/italic.
  6. What did you see instead? : End of closing format are part of URL.
  7. Did you confirm your output is different from CommonMark online demo or other official renderer correspond with an extension?: Yes

Creation:

var markdown = goldmark.New(goldmark.WithExtensions(extension.GFM))

It seems the default email regex parses differently.

Exact content:

__http://test.com/~/a__  
__http://test.com/~/__  
__http://test.com/~__  
__http://test.com/a/~__  

GitHub Flavored Markdown:

Goldmark render:

__<a href="http://test.com/~/a__">http://test.com/~/a__</a><br>
__<a href="http://test.com/~/__">http://test.com/~/__</a><br>
__<a href="http://test.com/~__">http://test.com/~__</a><br>
__<a href="http://test.com/a/~__">http://test.com/a/~__</a>
stale[bot] commented 3 years 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.

yuin commented 3 years ago

/open

stale[bot] commented 3 years 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.