Github / Discourse behaviour for rendering certain markup

The Github markdown processor renders `%{`_name_`}` as %{name}, but hugo renders it as `%{`_name_`}`.
Is there a config setting to get the Github behaviour?

I think this is a Goldmark bug. Using screen captures for clarity…

This markdown:

image

produces this HTML:

<p><code>%{</code>_name_<code>}</code></p>

But this markdown:

image

produces this HTML:

<p><code>%{</code><em>name</em><code>}</code></p>

According to https://spec.commonmark.org/dingus/, both should produce:

<p><code>%{</code><em>name</em><code>}</code></p>

In config.toml, if you set:

[markup]
defaultMarkdownHandler = "blackfriday"

you will get the expected result, which to me indicates this is a Goldmark error.

Please create an issue at https://github.com/yuin/goldmark/issues.

https://github.com/yuin/goldmark/issues says:

goldmark is not dedicated for Hugo. If you are Hugo user and your issue was raised by your experience in Hugo, you should consider create issue at Hugo repository at first .

Suggestive, but not compelling. If you’d prefer, create a Hugo issue, then create a Goldmark issue, then link the two with an Upstream tag on the Hugo issue.

Ok, did my best… Even wrote my first go program ever ;).

1 Like

Nicely done.

1 Like
4 Likes

Open Source for the win…

Waiting for hugo to upgrade its goldmark module…