Skip to content

Commit

Permalink
fix(gatsby-plugin-mdx): properly pass plugin options to subplugins (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Oct 14, 2021
1 parent 0d7179e commit 83396a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module.exports = function createSchemaCustomization(
debug(`required`, plugin)
if (_.isFunction(requiredPlugin.setParserPlugins)) {
for (const parserPlugin of requiredPlugin.setParserPlugins(
plugin.options || {}
plugin.pluginOptions || {}
)) {
if (_.isArray(parserPlugin)) {
const [parser, parserPluginOptions] = parserPlugin
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-mdx/loaders/mdx-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ ${contentWithoutFrontmatter}`
debug(`required`, plugin)
if (_.isFunction(requiredPlugin.setParserPlugins)) {
for (const parserPlugin of requiredPlugin.setParserPlugins(
plugin.options || {}
plugin.pluginOptions || {}
)) {
if (_.isArray(parserPlugin)) {
const [parser, parserPluginOptions] = parserPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module.exports = async function getSourcePluginsAsRemarkPlugins({
cache,
...helpers,
},
plugin.options || {}
plugin.pluginOptions || {}
)

return markdownAST
Expand Down

0 comments on commit 83396a5

Please sign in to comment.