Skip to content

Commit

Permalink
fix(module): disable MDC plugin if user disabled it (#2707)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Jul 12, 2024
1 parent 75208f1 commit d420dd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ export default defineNuxtModule<ModuleOptions>({
// Process markdown plugins, resolve paths
contentContext.markdown = processMarkdownOptions(contentContext.markdown)

// Disable MDC plugin if user disabled it
if (options.markdown?.mdc === false) {
(contentContext.markdown.remarkPlugins as Record<string, any>)['remark-mdc'] = undefined
}

const nuxtMDCOptions = {
remarkPlugins: contentContext.markdown.remarkPlugins,
rehypePlugins: contentContext.markdown.rehypePlugins,
Expand Down

0 comments on commit d420dd8

Please sign in to comment.