mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 14:25:19 +00:00
Update index.ts
This commit is contained in:
parent
d87584e7ad
commit
e6add2869b
1 changed files with 2 additions and 2 deletions
|
|
@ -555,7 +555,7 @@ export const removeFormattings = (str: string) => {
|
||||||
return str
|
return str
|
||||||
// Block elements (remove completely)
|
// Block elements (remove completely)
|
||||||
.replace(/(```[\s\S]*?```)/g, '') // Code blocks
|
.replace(/(```[\s\S]*?```)/g, '') // Code blocks
|
||||||
.replace(/^\|.*\|$/gm, '') // Tables};
|
.replace(/^\|.*\|$/gm, '') // Tables
|
||||||
// Inline elements (preserve content)
|
// Inline elements (preserve content)
|
||||||
.replace(/(?:\*\*|__)(.*?)(?:\*\*|__)/g, '$1') // Bold
|
.replace(/(?:\*\*|__)(.*?)(?:\*\*|__)/g, '$1') // Bold
|
||||||
.replace(/(?:[*_])(.*?)(?:[*_])/g, '$1') // Italic
|
.replace(/(?:[*_])(.*?)(?:[*_])/g, '$1') // Italic
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue