diff options
Diffstat (limited to 'packages/markdown/remark/src/index.ts')
-rw-r--r-- | packages/markdown/remark/src/index.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/markdown/remark/src/index.ts b/packages/markdown/remark/src/index.ts index d942bf7bf..5df5566a1 100644 --- a/packages/markdown/remark/src/index.ts +++ b/packages/markdown/remark/src/index.ts @@ -36,8 +36,15 @@ export async function renderMarkdown( content: string, opts: MarkdownRenderingOptions = {} ): Promise<MarkdownRenderingResult> { - let { fileURL, mode = 'mdx', syntaxHighlight = 'shiki', shikiConfig = {}, remarkPlugins = [], rehypePlugins = [] } = opts; - const input = new VFile({ value: content, path: fileURL }) + let { + fileURL, + mode = 'mdx', + syntaxHighlight = 'shiki', + shikiConfig = {}, + remarkPlugins = [], + rehypePlugins = [], + } = opts; + const input = new VFile({ value: content, path: fileURL }); const scopedClassName = opts.$?.scopedClassName; const isMDX = mode === 'mdx'; const { headers, rehypeCollectHeaders } = createCollectHeaders(); |