Skip to content

Commit

Permalink
Remove deprecated plugin options, fixes #718 (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
johno committed Jul 22, 2020
1 parent 0da2fcf commit 6098d94
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions packages/mdx/index.js
Expand Up @@ -16,16 +16,7 @@ const DEFAULT_OPTIONS = {
}

function createMdxAstCompiler(options) {
const mdPlugins = options.mdPlugins
const remarkPlugins = options.remarkPlugins
const plugins = mdPlugins || remarkPlugins

if (mdPlugins) {
console.error(`
@mdx-js/mdx: The mdPlugins option has been deprecated in favor of remarkPlugins
Support for mdPlugins will be removed in MDX v2
`)
}
const plugins = options.remarkPlugins

const fn = unified()
.use(toMDAST, options)
Expand All @@ -49,16 +40,7 @@ function createMdxAstCompiler(options) {
}

function applyHastPluginsAndCompilers(compiler, options) {
const hastPlugins = options.hastPlugins
const rehypePlugins = options.rehypePlugins
const plugins = hastPlugins || rehypePlugins

if (hastPlugins) {
console.error(`
@mdx-js/mdx: The hastPlugins option has been deprecated in favor of rehypePlugins
Support for hastPlugins will be removed in MDX v2
`)
}
const plugins = options.rehypePlugins

const compilers = options.compilers

Expand Down

0 comments on commit 6098d94

Please sign in to comment.