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

This commit is contained in:
XiaoCC 2025-06-18 11:31:04 +08:00 committed by GitHub
parent 45c89bd6de
commit 0784c6295d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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'),