Replies: 1 comment
-
Looking at https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-mdx/utils/create-mdx-node.js#L15 it does not seem to be possible atm :(. The plugin seems to just re-throw any error it gets from mdx =\ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My situation is as follows:
I get input content as a set of "blocks" each of the blocks contains a flavored Markdown. A part of this special flavor is that html elements are not rendered. So those block can contain both valid and invalid html (I don't control the content).
What I want to do is to assemble a set of blocks into a pages rendered by MDX. Which works well most of the time, but things fail parsing (and the build) when there is malformed html present in the source.
My question is - can I somehow configure gatsby-plugin-mdx to fail gracefully in such a situation?
What I mean by "failing gracefully" is:
Alternatively a reliable way to escape html inside mdx would work too (related: mdx-js/mdx#1477 )- some good discussion there, but that's not sufficientBeta Was this translation helpful? Give feedback.
All reactions