From 25009b02c851cae5d46b08f15e5c8097aa13d3aa Mon Sep 17 00:00:00 2001 From: Silberengel Date: Sat, 15 Nov 2025 15:33:58 +0100 Subject: [PATCH] bugfix --- src/components/Note/MarkdownArticle/MarkdownArticle.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/Note/MarkdownArticle/MarkdownArticle.tsx b/src/components/Note/MarkdownArticle/MarkdownArticle.tsx index 29753ac..34177d3 100644 --- a/src/components/Note/MarkdownArticle/MarkdownArticle.tsx +++ b/src/components/Note/MarkdownArticle/MarkdownArticle.tsx @@ -205,7 +205,7 @@ function parseInlineMarkdownPreserveNewlines(text: string, keyPrefix: string): R // Render pattern (preserving newlines within the pattern) if (pattern.type === 'bold') { const boldLines = pattern.data.split('\n') - boldLines.forEach((line, lineIdx) => { + boldLines.forEach((line: string, lineIdx: number) => { if (lineIdx > 0) { parts.push(
) } @@ -215,7 +215,7 @@ function parseInlineMarkdownPreserveNewlines(text: string, keyPrefix: string): R }) } else if (pattern.type === 'italic') { const italicLines = pattern.data.split('\n') - italicLines.forEach((line, lineIdx) => { + italicLines.forEach((line: string, lineIdx: number) => { if (lineIdx > 0) { parts.push(
) } @@ -1338,7 +1338,6 @@ function parseMarkdownContent( if (nextLineStart < content.length) { const nextLineEnd = content.indexOf('\n', nextLineStart) const nextLineEndIndex = nextLineEnd === -1 ? content.length : nextLineEnd - const nextLine = content.substring(nextLineStart, nextLineEndIndex) // Check if next line has hashtags and no double newline before it const hasHashtagOnNextLine = filteredPatterns.some((p, idx) =>