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

Typographer ignores quotes following parentheses #128

Closed palant closed 4 years ago

palant commented 4 years ago
  1. What version of goldmark are you using? 1.1.25 (via Hugo v0.68.3/extended)

  2. What version of Go are you using? Presumably 1.12

  3. What operating system and processor architecture are you using? Ubuntu 20.04, x64

  4. What did you do? Render the text reported "issue 1 (IE-only)" with typographer extension enabled.

  5. What did you expect to see? reported “issue 1 (IE-only)”

  6. What did you see instead? reported “issue 1 (IE-only)"

  7. Did you confirm your output is different from CommonMark online demo or other official renderer correspond with an extension? The demo doesn't process quotation marks but Blackfriday (previous Hugo version) produced the correct output.

  8. Why you can not implement it as an extension?: I could probably write a fix myself, but I'd need a confirmation about the approach first. In my understanding, quotation marks preceding opening parentheses ([{ should be rendered as “ and those following closing parentheses )]} should be rendered as ”.

yuin commented 4 years ago

This is a limitation of the current algorithm. see https://github.com/yuin/goldmark/issues/39#issuecomment-561044672