Skip to content
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

fix(gatsby-plugin-mdx): Account for links/inline code in ToC #37739

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

yunsuklee
Copy link
Contributor

@yunsuklee yunsuklee commented Mar 11, 2023

Description

Fix to bug #37704 using @meganesu 's potential solution and updating the tests as required by @LekoArts .

Documentation

I'm afraid I do not know where to find this plugin's documentation 😞

Tests

I added tests to:
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-mdx/src/__tests__/remark-infer-toc-meta.ts

As mentioned here, I've added the new formatted headlines and ensured the expected behaviour.

Related Issues

Fixes #37704

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 11, 2023
@LekoArts LekoArts added topic: remark/mdx Related to Markdown, remark & MDX ecosystem and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 14, 2023
@LekoArts LekoArts changed the title fix(gatsby-plugin-mdx) #37704 fix(gatsby-plugin-mdx): Account for links/inline code in ToC Mar 14, 2023
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

This will be released in stable Gatsby in a week, I'll publish gatsby@next later today with this fix though already.

@yunsuklee
Copy link
Contributor Author

Great!
Thank you for the opportunity to contribute 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: remark/mdx Related to Markdown, remark & MDX ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MDX tableOfContents field doesn't populate titles correctly when headings contain Markdown formatting
2 participants