google / docsy

A set of Hugo doc templates for launching open source content.
https://docsy.dev
Apache License 2.0
2.63k stars 905 forks source link

Does not highlight code #416

Closed MarcinKlejna closed 3 years ago

MarcinKlejna commented 3 years ago

Template does not highlight code: other template: https://ibb.co/KqKypmd docsy: https://ibb.co/bRSK8t6

Markdown code

`\([^,]*\), \(.*\)`

<mark>`\(`</mark>`[^,]*`<mark>`\)`</mark>`, \(.*\)` Pierwsza część pomiędzy `\( \)` dopasowuje „Ostatnie”\
`\(`<mark>`[^,]`</mark>`*\), \(.*\)` dopasuj wszystko z wyjątkiem przecinka\
`\([^,]`<mark>`*`</mark>`\), \(.*\)` dowolną ilość razy\
`\([^,]*\)`<mark>`, `</mark>`\(.*\)` dopasowuje dosłownie `, `\
`\([^,]*\), `<mark>`\(`</mark>`.*`<mark>`\)`</mark> Druga część między `\( \)` dopasowuje "Pierwsze"\
`\([^,]*\), \(`<mark>`.`</mark>`*\)` dowolny znak\
`\([^,]*\), \(.`<mark>`*`</mark>`\)` dowolną ilość razy
LisaFC commented 3 years ago

So Hugo uses Goldmark as its Markdown processor, which by default ignores HTML in Markdown files unless you set the following in your config.toml:

[markup]
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true

(see https://www.docsy.dev/docs/adding-content/content/#page-contents-and-markup)

I did so in a test site and here's your code with highlighting: https://tender-beaver-c94732.netlify.app/docs/examples/

(if I comment out the unsafe = true the highlighting disappears)

MarcinKlejna commented 3 years ago

Thank you!