yuin / goldmark-highlighting

A Syntax highlighting extension for the goldmark markdown parser.
MIT License
100 stars 14 forks source link

Update chroma #14

Closed satotake closed 4 years ago

satotake commented 4 years ago

Upstream chroma had trouble with windows' style line ending (=\r\n), resulting in broken htmls The issue was fixed with https://github.com/alecthomas/chroma/pull/336 . This update will fix downstream issue (https://github.com/gohugoio/hugo/issues/6596)

Example

With an attached python-snippet.txt

Actual result (note </span>yle... just after </h1>)

<h1>Title</h1>
</span>yle="background-color:#fff"><span style="color:#998;font-style:italic"># launch program
<span style="color:#000;font-weight:bold">def</span> <span style="color:#900;font-weight:bold">main</span>():
    <span style="color:#000;font-weight:bold">print</span>(<span style="color:#099">1</span>)
</pre>

Expected result

<h1>Title</h1>
<pre style="background-color:#fff"><span style="color:#998;font-style:italic"># launch program</span>
<span style="color:#000;font-weight:bold">def</span> <span style="color:#900;font-weight:bold">main</span>():
    <span style="color:#000;font-weight:bold">print</span>(<span style="color:#099">1</span>)
</pre>
satotake commented 4 years ago

Thank you 🙇