From 6d30b1f785dec08f6953534b66c5dd37b765c305 Mon Sep 17 00:00:00 2001 From: GatsbyJS Bot Date: Tue, 2 Nov 2021 08:47:22 -0600 Subject: [PATCH] initial (#33802) (#33818) Co-authored-by: gatsbybot Co-authored-by: Lennart --- packages/gatsby-plugin-mdx/__tests__/gatsby-node.js | 1 + packages/gatsby-plugin-mdx/gatsby-node.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/packages/gatsby-plugin-mdx/__tests__/gatsby-node.js b/packages/gatsby-plugin-mdx/__tests__/gatsby-node.js index df7deffbfa0ba..f24ba7528839f 100644 --- a/packages/gatsby-plugin-mdx/__tests__/gatsby-node.js +++ b/packages/gatsby-plugin-mdx/__tests__/gatsby-node.js @@ -63,6 +63,7 @@ describe(`pluginOptionsSchema`, () => { mediaTypes: [`text/markdown`, `text/x-markdown`, `custom-media/type`], shouldBlockNodeFromTransformation: node => Boolean(node), root: `james-holden`, + commonmark: true, }) expect(isValid).toBe(true) diff --git a/packages/gatsby-plugin-mdx/gatsby-node.js b/packages/gatsby-plugin-mdx/gatsby-node.js index 4c7b964582c29..d5bc469cf66f2 100644 --- a/packages/gatsby-plugin-mdx/gatsby-node.js +++ b/packages/gatsby-plugin-mdx/gatsby-node.js @@ -120,5 +120,10 @@ exports.pluginOptionsSchema = function ({ Joi }) { .description( `[deprecated] This is a legacy option that used to define root directory of the project. It was needed to generate a cache directory location. It currently has no effect.` ), + commonmark: Joi.boolean() + .default(false) + .description( + "MDX will be parsed using CommonMark." + ), }) }