You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome 123.0.6312.87, devbox
Operating system and version (e.g. Ubuntu 20.04.2 LTS): OSX 12.6.6
Self-service
I'd be willing to fix this bug myself.
The text was updated successfully, but these errors were encountered:
plocket
added
bug
An error in the Docusaurus core causing instability or issues with its execution
status: needs triage
This issue has not been triaged by maintainers
labels
Apr 4, 2024
TOC in docusaurus-mdx-loader currently does not parse JSX. Not just comments but any expression is simply just converted to string i.e.
{5+5}
becomes "5 + 5".
In the code a comment actually states this as a todo
// TODO This is really a workaround, and not super reliable
// For now we only support serializing tagName, className and content
// Can we implement the TOC with real JSX nodes instead of html strings later?
I tried implementing it but wasn't able to without making the code insecure (eval). If a maintainer can point out how that is achieved for headings within the document I could work towards porting it for the TOC. I wasn't able to find that implementation by myself.
Josh-Cena
added
closed: duplicate
This issue or pull request already exists in another issue or pull request
and removed
bug
An error in the Docusaurus core causing instability or issues with its execution
status: needs triage
This issue has not been triaged by maintainers
labels
Apr 8, 2024
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
The table of contents menu shows the comments in the heading, well as the text of the other nodes.
There is probably an issue for this already, but I couldn't find it.
Reproducible demo
https://codesandbox.io/p/devbox/intelligent-franklin-s3vldx
Steps to reproduce
Expected behavior
I thought the text of the comment that I put in the heading would be invisible in the table of contents.
Actual behavior
The text of the comments was visible in the table of contents.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: