fix Multiple <think>\n Interface rendering exception (#20977)
This commit is contained in:
parent
45c89bd6de
commit
0784c6295d
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue