Feat: Write the thinking style in the MarkdownContent layer #4930 (#5091)

### What problem does this PR solve?

Feat: Write the thinking style in the MarkdownContent layer #4930

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-02-18 19:34:54 +08:00
committed by GitHub
parent 189007e44d
commit f8b80f3f93
4 changed files with 13 additions and 9 deletions

View File

@ -50,7 +50,7 @@ export const preprocessLaTeX = (content: string) => {
return inlineProcessedContent;
};
export function replaceThinkToSection(text: string) {
export function replaceThinkToSection(text: string = '') {
const pattern = /<think>([\s\S]*?)<\/think>/g;
const result = text.replace(pattern, '<section class="think">$1</section>');