diff options
| author | Mahesh Sanikommmu <[email protected]> | 2025-10-10 21:29:27 -0700 |
|---|---|---|
| committer | Mahesh Sanikommmu <[email protected]> | 2025-10-10 21:29:27 -0700 |
| commit | b12dfc13f61499f7921d974a6cdb577ec57fb925 (patch) | |
| tree | f6f9b286c37c4e0acbde5fb2df5661a51bcaa03e | |
| parent | removed unused code and lint issues (diff) | |
| download | supermemory-b12dfc13f61499f7921d974a6cdb577ec57fb925.tar.xz supermemory-b12dfc13f61499f7921d974a6cdb577ec57fb925.zip | |
removed unneccasry comments
| -rw-r--r-- | apps/web/components/memories-utils/html-content-renderer.tsx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/web/components/memories-utils/html-content-renderer.tsx b/apps/web/components/memories-utils/html-content-renderer.tsx index a8185f44..3caf3448 100644 --- a/apps/web/components/memories-utils/html-content-renderer.tsx +++ b/apps/web/components/memories-utils/html-content-renderer.tsx @@ -36,22 +36,17 @@ export const HTMLContentRenderer = memo( } } - // Preprocess content to improve markdown detection and formatting let processed = content - // Handle terminal commands (lines starting with $) if (content.includes("\n$ ")) { - // Convert terminal commands to code blocks for better formatting processed = content.replace(/^\$ (.*$)/gm, "```bash\n$ $1\n```") } - // Handle cases where content looks like JSON but isn't in code blocks if ( content.trim().startsWith("{") && content.includes('"') && content.includes(":") ) { - // Check if it looks like JSON and wrap it in a code block const lines = content.split("\n") let inJsonBlock = false const jsonLines: string[] = [] @@ -86,7 +81,7 @@ export const HTMLContentRenderer = memo( return { isHTML: false, - isMarkdown: true, // Try markdown rendering for all non-HTML content + isMarkdown: true, processedContent: processed, } }, [content]) @@ -195,7 +190,6 @@ export const HTMLContentRenderer = memo( </div> ) } catch { - // Fallback to plain text if markdown parsing fails return ( <p className={`text-sm leading-relaxed whitespace-pre-wrap text-foreground ${className}`} |