Closed matloob closed 8 months ago
Here's a go program that runs markdown and goldmark on the following input: https://go.dev/play/p/zZ0vWAgKB0c:
[![Line Break](https://line.break/image)](https://line.break)
Which is rendered on github with a space instead of the newline in the alt text:
<p dir="auto"><a href="https://line.break" rel="nofollow"><img src="https://camo.githubusercontent.com/743b6218bc25f78b5f7f654f1ce773766351a2e3605cf8b47c60659055c218ac/68747470733a2f2f6c696e652e627265616b2f696d616765" alt="Line Break" data-canonical-src="https://line.break/image" style="max-width: 100%;"></a></p>
The output is
markdown: <p><a href="https://line.break"><img src="https://line.break/image" alt="LineBreak" /></a></p> goldmark: <p><a href="https://line.break"><img src="https://line.break/image" alt="Line Break" /></a></p>
It seems like goldmark's behavior is also different from github's as goldmark preserves the line break.
Here's a go program that runs markdown and goldmark on the following input: https://go.dev/play/p/zZ0vWAgKB0c:
Which is rendered on github with a space instead of the newline in the alt text:
The output is
It seems like goldmark's behavior is also different from github's as goldmark preserves the line break.