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

pull/21152/head
XiaoCC 8 months ago committed by GitHub
parent 45c89bd6de
commit 0784c6295d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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