Skip to content

Commit

Permalink
add rehypeRaw passThrough
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jun 9, 2023
1 parent 90409dc commit 8a1b0ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/_component/editor.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {VFile} from 'vfile'
import {VFileMessage} from 'vfile-message'
import {statistics} from 'vfile-statistics'
import {reporter} from 'vfile-reporter'
import {evaluate} from '@mdx-js/mdx'
import {evaluate, nodeTypes} from '@mdx-js/mdx'
import remarkGfm from 'remark-gfm'
import rehypeRaw from 'rehype-raw'
import remarkFrontmatter from 'remark-frontmatter'
Expand Down Expand Up @@ -60,7 +60,8 @@ function useMdx(defaults) {
remarkPlugins.push(capture('mdast'))

const rehypePlugins = []
if (config.rehypeRaw) rehypePlugins.push(rehypeRaw)
if (config.rehypeRaw)
rehypePlugins.push([rehypeRaw, {passThrough: nodeTypes}])
rehypePlugins.push(capture('hast'))

try {
Expand Down

0 comments on commit 8a1b0ff

Please sign in to comment.