We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional languages for the syntax highlighting in Docusarus (https://docusaurus.io/docs/markdown-features/code-blocks#supported-languages)
Example:
module.exports = { // ... themeConfig: { prism: { additionalLanguages: ['java'], }, // ... }, };
The additional language is correctly enabled in Docusaurus, however, when navigating to a Redocusaurus page the following error is happening:
Uncaught (in promise) TypeError: lang is undefined
"dependencies": { "@docusaurus/core": "2.0.0-beta.3", "@docusaurus/preset-classic": "2.0.0-beta.3", "@mdx-js/react": "^1.6.22", "@svgr/webpack": "^5.5.0", "clsx": "^1.1.1", "core-js": "^3.9.1", "docusaurus-theme-redoc": "^0.4.4", "file-loader": "^6.2.0", "prism-react-renderer": "^1.2.1", "react": "^17.0.1", "react-dom": "^17.0.1", "redoc": "^2.0.0-rc.54", "redocusaurus": "^0.4.4", "remark-mermaid-dataurl": "^1.0.1", "url-loader": "^4.1.1" },
Any idea of how to fix it? Thanks
The text was updated successfully, but these errors were encountered:
Redoc also ships prism with itself, the global configs might be conflicting.
Sorry, something went wrong.
I noticed that the problem disappear if I add the language "scala" on top of "java":
module.exports = { // ... themeConfig: { prism: { additionalLanguages: ['java', 'scala'], }, // ... }, };
As you said, this is probably due to conflicts with prism in Redoc. I guess Redoc expects to have Scala enabled. Feel free to close the bug.
Thanks
Thanks for posting the solution 👍
No branches or pull requests
How to reproduce
Add additional languages for the syntax highlighting in Docusarus (https://docusaurus.io/docs/markdown-features/code-blocks#supported-languages)
Example:
The additional language is correctly enabled in Docusaurus, however, when navigating to a Redocusaurus page the following error is happening:
Uncaught (in promise) TypeError: lang is undefined
Dependencies used in package.json
Any idea of how to fix it?
Thanks
The text was updated successfully, but these errors were encountered: