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

chore(gatsby-plugin-mdx): Document CommonMark option #30669

Merged
merged 3 commits into from Apr 20, 2021

Conversation

kennethormandy
Copy link
Contributor

Description

By default, gatsby-plugin-mdx doesn’t seem to support CommonMark features like using \ for single line breaks.

Apparently, you can pass along commonmark: true, and this will work. It works as expected from my testing. It might be because the options all get passed along to Remark? mdx-js/mdx#421 (comment)

Documentation

This adds the option to the documentation.

The description could be improved, depending on whether this option is actually supported or not, etc. MDX v2 and the most recent Remark documentation also suggests that CommonMark is the default, so I’m not sure what happens to this option, or if it’s even necessary in that case. With MDX v1, adding this option solves the problem for me.

@gatsbyjs/documentation

Related Issues

mdx-js/mdx#421

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Apr 3, 2021
@LekoArts LekoArts added topic: MDX type: documentation An issue or pull request for improving or updating Gatsby's documentation and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Apr 6, 2021
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! With v2 of MDX we'll need to remove it but until then this is fine :)

@LekoArts LekoArts changed the title Document CommonMark option for gatsby-plugin-mdx chore(gatsby-plugin-mdx): Document CommonMark option Apr 20, 2021
@LekoArts LekoArts merged commit 463047d into gatsbyjs:master Apr 20, 2021
@no-chris
Copy link

no-chris commented Nov 1, 2021

@LekoArts This is still in the documentation although the option is not valid anymore (a warning for invalid option is generated during the build)

warn Warning: there are unknown plugin options for "gatsby-plugin-mdx": commonmark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants