Skip to content

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Dec 9, 2024

This PR is fixing all the highlighting issue in markdown block and adds some improvement.

For the context, quarto embeds a markdown.xml that is tweaked to support special quarto syntax for computation code block. However, the tweaked file was overwritten in c47753c while updating markdown.xml from upstream.

So this PR first re-enable everything:

  • enable markdown highlighting to correctly identify pandoc and rmd/qmd style code blocks (83e587e)
  • ensure that markdown highlights embedded ojs (f56363d)
  • embedded highlight for julia (a5d07f6)
  • add minimal highlighting to dot and mermaid (e135a14)

All this was lost several Quarto version ago, and we did not notice while our website lost its highligting for julia, ojs and diagram example. 🤦

This PR also adds some better support for julia and dot which are both supported language by skylighting already. So the markdown.xml is further customized so that it defer to those language highlighting for embedded code block.

This fixes part of #1453 as now dot will correctly be highlighed.

For mermaid, it will require creating or finding a mermaid.xml as KDE doesn't have one.

This PR also add tests so that we don't break this again.

@cderv
Copy link
Collaborator Author

cderv commented Dec 10, 2024

I was working on a new mermaid.xml support to close #1453 but this is not as straightforward as I thought

So let's merge the current fix, and handle new mermaid higlighter later in a separate PR.

@cderv cderv merged commit bf550cf into main Dec 10, 2024
47 checks passed
@cderv cderv deleted the fix/markdown-highlight-for-quarto branch December 10, 2024 19:20
@cderv cderv linked an issue Mar 31, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

when using double brackets for code , highlight doesn't work

2 participants