russross / blackfriday

Blackfriday: a markdown processor for Go
Other
5.42k stars 598 forks source link

Request to tag the next v1.x version of Blackfriday so that Hugo can use it #550

Open kaushalmodi opened 5 years ago

kaushalmodi commented 5 years ago

Ref: https://github.com/gohugoio/hugo/issues/6040


Hello,

I discovered this issue recently [from this comment in the Hugo Discourse forum][1].

The issue is that for a Markdown snippet:

-   list item 1
    ```md
    *hello*

list item 2 now gets nested under list item 1.

This issue wasn't there until Hugo v0.55.5. The last good Hugo version without this regression is v0.55.4.

Recreating this issue is very easy; just clone the below repo and run it with Hugo v0.55.4 vs Hugo v0.55.5, and see the difference:

My best bet is that [this commit][2] in Blackfriday caused this regression.

The regression was seen in Hugo in v0.55.5, because it's in that version that Blackfriday version was bumped to version v1.5.2 in [this commit][3].


Example snippet

-   List item 1

    ```md
    *abc*
    /def/
    =def=

Rendering of above in Hugo v0.55.4

<ul>
<li><p>List item 1</p>

<pre><code class="language-md">*abc*
/def/
=def=
</code></pre></li>

<li><p>List item 2</p></li>
</ul>

Rendering of above in Hugo v0.55.5 (regression)


<ul>
<li><p>List item 1</p>

<pre><code class="language-md">*abc*
/def/
=def=
</code></pre>

<ul>
<li>List item 2</li>
</ul></li>
</ul>
--- /cc @aignas Can you review if your Blackfriday commit referenced above caused this regression and can you please fix it? [1]: https://discourse.gohugo.io/t/rendering-code-blocks-properly-from-md-files/19126/19?u=kaushalmodi [2]: https://github.com/russross/blackfriday/commit/a477dd1646916742841ed20379f941cfa6c5bb6f [3]: https://github.com/gohugoio/hugo/commit/1cbb501be8aa83b08865fbb6ad5aee254946712f
aignas commented 5 years ago

I think this is a duplicate of #495, see the referenced hugo issue.