Skip to content

Commit

Permalink
feat(v2): allow specifying of remark and rehype plugins before defaul…
Browse files Browse the repository at this point in the history
…t plugins (#2689)

* feat(v2): swap order of markdown plugins

* feat(v2): remark/rehype plugins can override default plugins
  • Loading branch information
kasperp committed May 22, 2020
1 parent 0ff6dd3 commit 0e61da8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/docusaurus-mdx-loader/src/index.js
Expand Up @@ -27,10 +27,12 @@ module.exports = async function (fileString) {
const options = {
...reqOptions,
remarkPlugins: [
...(reqOptions.beforeDefaultRemarkPlugins || []),
...DEFAULT_OPTIONS.remarkPlugins,
...(reqOptions.remarkPlugins || []),
],
rehypePlugins: [
...(reqOptions.beforeDefaultRehypePlugins || []),
...DEFAULT_OPTIONS.rehypePlugins,
...(reqOptions.rehypePlugins || []),
],
Expand Down

0 comments on commit 0e61da8

Please sign in to comment.