fix Multiple <think>\n Interface rendering exception

pull/20977/head
XiaoCC 11 months ago
parent c05e47ebc0
commit 4f25dd2a0f

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

Loading…
Cancel
Save