Browse Source

fix Multiple <think>\n Interface rendering exception (#20977)

tags/1.5.0
XiaoCC 4 months ago
parent
commit
0784c6295d
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      web/app/components/base/markdown/markdown-utils.ts

+ 1
- 1
web/app/components/base/markdown/markdown-utils.ts View File

@@ -28,7 +28,7 @@ export const preprocessLaTeX = (content: string) => {
}

export const preprocessThinkTag = (content: string) => {
const thinkOpenTagRegex = /<think>\n/g
const thinkOpenTagRegex = /(<think>\n)+/g
const thinkCloseTagRegex = /\n<\/think>/g
return flow([
(str: string) => str.replace(thinkOpenTagRegex, '<details data-think=true>\n'),

Loading…
Cancel
Save