From de6e22a858494df77a489edb6518b2032a26b11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Mon, 10 Mar 2025 13:18:33 +0100 Subject: [PATCH] fix: fixed tags support --- src/utils/markdownUtils.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utils/markdownUtils.ts b/src/utils/markdownUtils.ts index 24149c3..6445a13 100644 --- a/src/utils/markdownUtils.ts +++ b/src/utils/markdownUtils.ts @@ -76,15 +76,15 @@ export function processNestedCodeBlocks(content: string) { } export function transformThinkingTags(content: string) { - if (content.startsWith('`') && content.endsWith('`')) { - return content; - } + if (content.startsWith('`') && content.endsWith('`')) { + return content; + } - return content.replace( - /([\s\S]*?)<\/thinking>/g, - (_match: string, thinkingContent: string) => - `
💭 Thinking\n\n${thinkingContent}\n\n
` - ); + return content.replace( + /([\s\S]*?)<\/think(?:ing)?>/g, + (_match: string, thinkingContent: string) => + `
💭 Thinking\n\n${thinkingContent}\n\n
` + ); } export function parseMarkdownContent(content: string) {