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

html.WithHardWraps() is not working #356

Closed ivanjaros closed 1 year ago

ivanjaros commented 1 year ago

html.WithHardWraps() sets the const optHardWraps renderer.OptionName = "HardWraps" config option but is is not utilized anywhere. Hence new lines are not translated into <br/>.

yuin commented 1 year ago

You seem misunderstanding source codes. WithHardWraps works correctly and is referenced like

https://github.com/yuin/goldmark/blob/60df4aadee09cba8a9e28af96d5e9e8883050ff4/renderer/html/html.go#L648

ivanjaros commented 1 year ago

ok so, this checks for " " two empty spaces at the end of the line, correct? if so, how do i force break for simple \n ?