docusaurus
docusaurus copied to clipboard
When using commonmark, `<var>` inside of `<code>` results in a codeblock
Have you read the Contributing Guidelines on issues?
- [X] I have read the Contributing Guidelines on issues.
Prerequisites
- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the
npm run clear
oryarn clear
command. - [X] I have tried
rm -rf node_modules yarn.lock package-lock.json
and re-installing packages. - [X] I have tried creating a repro with https://new.docusaurus.io.
- [X] I have read the console error message carefully (if applicable).
Description
Heres the rerpo of the issue - you can see the demo here
This is the problem code:
# intro.md:
This is <code>inline <var>var</var></code>
Results in
However, it should not result in a code block, instead it should still be inline.
Note that if you remove commonmark support by editing docusaurus.config.ts
to not have:
markdown: {
format: 'detect',
},
Then it works with inlining.
I know commonmark support is experimental, and I am not expecting a quick fix. I am merely hoping my issue report will help improve support for commonmark when it does work. Thanks a ton for all of your work on this project :)
Self-service
- [X] I'd be willing to fix this bug myself.