rsc / markdown

Basic Markdown parser and HTML generator
BSD 3-Clause "New" or "Revised" License
81 stars 4 forks source link

goldmark and markdown diff with h1 inside p #6

Closed matloob closed 8 months ago

matloob commented 8 months ago

Here's a program that runs goldmark and markdown on the following input: https://go.dev/play/p/rTnPTxps_zw

<p align="center">

<h1>Text</h1>
body
</p>

It's hard for me to tell exactly what github is doing with this input, but it doesn't seem like it's putting the h1 into a p:

Text

body

Here's the output of the program:

markdown:
<p align="center">
<p><h1>Text</h1>
body</p>
</p>

goldmark:
<p align="center">
<h1>Text</h1>
body
</p>