(html: boolean)
| 77 | } |
| 78 | |
| 79 | export function rehypePlugins(html: boolean) { |
| 80 | const plugins: PluggableList = []; |
| 81 | |
| 82 | if (html) { |
| 83 | plugins.push(rehypeRaw, [rehypeSanitize, rehypeSanitizeOptions]); |
| 84 | } |
| 85 | |
| 86 | return plugins; |
| 87 | } |
| 88 | |
| 89 | const limitedMarkdownPlugin: Plugin = () => { |
| 90 | return (tree, file) => { |