Skip to content

Commit 3400cc4

Browse files
committed
fix: revert escape for markdown
1 parent c029040 commit 3400cc4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/renderer/src/components/message/MessageBlockContent.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- 使用结构化渲染器替代 v-html -->
66
<MarkdownRenderer
77
v-if="part.type === 'text'"
8-
:content="escapedContent(part.content)"
8+
:content="part.content"
99
:loading="part.loading"
1010
@copy="handleCopyClick"
1111
/>
@@ -62,11 +62,6 @@ const handleCopyClick = () => {
6262
// 现在复制功能在组件内部处理
6363
}
6464
65-
// 逃逸方括号,避免 markdown 被解析为 reference
66-
const escapedContent = (content: string) => {
67-
return content.replace(/\[/g, '&#91;').replace(/\]/g, '&#93;')
68-
}
69-
7065
// 修改 watch 函数
7166
watch(
7267
processedContent,

0 commit comments

Comments
 (0)