Browse Source

Update index.ts

denispol 4 months ago
parent
commit
e6add2869b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib/utils/index.ts

+ 2 - 2
src/lib/utils/index.ts

@@ -555,8 +555,8 @@ 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};
-		// Inline elements (preserve content)
+        .replace(/^\|.*\|$/gm, '')                          // Tables
+	// Inline elements (preserve content)
         .replace(/(?:\*\*|__)(.*?)(?:\*\*|__)/g, '$1')      // Bold
         .replace(/(?:\*\*|__)(.*?)(?:\*\*|__)/g, '$1')      // Bold
         .replace(/(?:[*_])(.*?)(?:[*_])/g, '$1')            // Italic
         .replace(/(?:[*_])(.*?)(?:[*_])/g, '$1')            // Italic
         .replace(/~~(.*?)~~/g, '$1')                        // Strikethrough
         .replace(/~~(.*?)~~/g, '$1')                        // Strikethrough