ソースを参照

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

tags/1.5.0
XiaoCC 4ヶ月前
コミット
0784c6295d
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      web/app/components/base/markdown/markdown-utils.ts

+ 1
- 1
web/app/components/base/markdown/markdown-utils.ts ファイルの表示

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

読み込み中…
キャンセル
保存