mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: When voice playback is turned on, if the answer contains a link, there will be the following abnormal message (#4488)
This commit is contained in:
parent
11a894f871
commit
cb977a71ec
|
|
@ -178,6 +178,8 @@ function markdownToPlainText(md: string) {
|
|||
.replace(/`(.*?)`/g, '$1')
|
||||
// 移除代码块 ```code```
|
||||
.replace(/```[\s\S]*?```/g, '')
|
||||
// 移除html标签
|
||||
.replace(/<[^>]+>/g, '')
|
||||
// 移除多余的换行符
|
||||
.replace(/\n{2,}/g, '\n')
|
||||
.trim()
|
||||
|
|
|
|||
Loading…
Reference in New Issue