From 97a3871a8d496792daa6e0473753493fb95dd750 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 1 Feb 2026 03:51:53 +0100 Subject: [PATCH] Add markdownHtml memoization in App.tsx --- src/App.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 5cf4483..f37ed7b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -196,6 +196,10 @@ export default function App() { const hasText = body.trim().length > 0; const showLineNumbersActive = showLineNumbers && !markdownPreview; const hasSearch = search.trim().length > 0; + const markdownHtml = useMemo( + () => (markdownPreview ? markdownToHTML(body) : ""), + [body, markdownPreview] + ); const folderById = useMemo(() => { const map = new Map();