From 1dcea7af8d1fb05600b7e4a64801e53883f25ea1 Mon Sep 17 00:00:00 2001 From: takashi-uchida <104770122+takashi-uchida@users.noreply.github.com> Date: Wed, 9 Apr 2025 21:01:22 +0900 Subject: [PATCH] Update markdown-features-code-blocks.mdx --- .../markdown-features/markdown-features-code-blocks.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/docs/guides/markdown-features/markdown-features-code-blocks.mdx b/website/docs/guides/markdown-features/markdown-features-code-blocks.mdx index da7e5d0205..8be9828dcd 100644 --- a/website/docs/guides/markdown-features/markdown-features-code-blocks.mdx +++ b/website/docs/guides/markdown-features/markdown-features-code-blocks.mdx @@ -94,6 +94,7 @@ To add syntax highlighting for any of the other [Prism-supported languages](http Each additional language has to be a valid Prism component name. For example, Prism would map the _language_ `cs` to `csharp`, but only `prism-csharp.js` exists as a _component_, so you need to use `additionalLanguages: ['csharp']`. You can look into `node_modules/prismjs/components` to find all components (languages) available. + ::: For example, if you want to add highlighting for the PowerShell language: @@ -113,6 +114,12 @@ export default { After adding `additionalLanguages`, restart Docusaurus. +:::warning + +When using Java or Scala, both must be included together in additionalLanguages + +::: + If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages`: ```bash npm2yarn