gomarkdown / markdown

markdown parser and HTML renderer for Go
Other
1.37k stars 172 forks source link

fix markdown html block rendering #238

Closed pashnik closed 2 years ago

pashnik commented 2 years ago

Hello! Recently found that the markdown renderer renders html blocks incorrectly. According to spec block level html must be separated from surrounding content by blank lines. Seems like my naive fix could help.

So, for example, this markdown:

This is a regular paragraph.

Foo

This is another regular paragraph.

Renders as:

This is a regular paragraph.

Foo

This is another regular paragraph.

kjk commented 2 years ago

Thanks!