-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
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
feat(v2): support rightToc, emoji, slug for docs #1382
Conversation
Deploy preview for docusaurus-2 ready! Built with commit d7a28f5 |
Deploy preview for docusaurus-preview ready! Built with commit 47add6f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't review the parsing code too thoroughly but if it works it's fine. This is not a crucial architectural change so it's probably ok to ship potentially buggy implementations. Typically I'd avoid using babel traversal if I could, but if the perf didn't regress too much it's probably ok. Did the startup time change by much?
packages/docusaurus-mdx-loader/src/rightToc/__tests__/fixtures/name-exist.mdx
Show resolved
Hide resolved
packages/docusaurus-mdx-loader/src/rightToc/__tests__/index.test.js
Outdated
Show resolved
Hide resolved
packages/docusaurus-mdx-loader/src/rightToc/__tests__/index.test.js
Outdated
Show resolved
Hide resolved
I had to use babel because technically what this is doing is not just MDAST, but MDXAST (MDAST + JSX). |
Motivation
:dog: :+1:
-> 🐶 👍Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
rightToc
works. See snapshots for structureTODO: