jaspervdj / hakyll

A static website compiler library in Haskell
jaspervdj.be/hakyll
Other
2.7k stars 409 forks source link

Spurious underscores in Makefile syntax highlighting #1032

Closed jstolarek closed 6 months ago

jstolarek commented 6 months ago

I updated Hakyll to version 4.16.2.0 and noticed a questionable change in syntax highlighting. Consider this snippet of a Makefile:

```Makefile
all:
       git add .
       git commit -m "Local changes (via Makefile)" || exit 0

.PHONY: all
\```

This is how it used to render:

before

vs how it renders now:

after

Note the extra leading underscores. Generated HTML before:

<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>       git add .</span>

and after:

<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="er">       </span>git add .</span>
Minoru commented 6 months ago

Hakyll relies on Pandoc for syntax highlighting, which in turn relies on https://hackage.haskell.org/package/skylighting. Most likely skylighting and/or pandoc got updated when updating Hakyll, breaking the resulting HTML. Please report the problem to one of those projects instead.