修复引用嵌套的问题

This commit is contained in:
tianyaxiang 2025-02-02 09:26:17 +08:00
parent a3b8fa295c
commit d2f05c7b71

View File

@ -117,7 +117,10 @@ export function convertToWechat(markdown: string, options: RendererOptions = def
renderer.blockquote = function({ text }: Tokens.Blockquote) {
const style = mergedOptions.block?.blockquote
const styleStr = cssPropertiesToString(style)
return `<blockquote${styleStr ? ` style="${styleStr}"` : ''}>${text}</blockquote>`
const tokens = marked.Lexer.lexInline(text)
const content = marked.Parser.parseInline(tokens, { renderer })
return `<blockquote${styleStr ? ` style="${styleStr}"` : ''}>${content}</blockquote>`
}
renderer.code = function({ text, lang }: Tokens.Code) {