December 30, 2019

Hugo, Goldmark, and SmartyPants

I’ve been very pleased with Hugo since switching away from my beloved, custom-admin themed Movable Type setup earlier this year. (I’ve written three whole posts since then!)

In November though, Hugo switched Markdown processors to Goldmark. And Goldmark seems to have a somewhat unsophisticated implementation of a SmartyPants-like punctuation processor which doesn’t properly handle apostrophes.

So now, when using the default Markdown processor, my site renders with straight single quotes in place of apostrophes. Fortunately, you can configure Hugo to use the former Markdown processor. (That’s good!) But the former Markdown processor is also cursed. (That’s bad.)

For some reason, Blackfriday (the former Markdown Processor) no longer converts certain characters (like < and >) to HTML entities (like &lt; and &gt;) when they’re within a code block. Which is something that it absolutely should and used to do!

Meanwhile I sit here, obstinately refusing to learn either enough Perl or Go to contribute to solving this problem in any meaningful way. Praying that this issue irritates enough people for someone with more free time on their hands to fix these issues. :)

Next Post