diff --git a/lib/markdownRenderer.tsx b/lib/markdownRenderer.tsx index 0d981fb..0504553 100644 --- a/lib/markdownRenderer.tsx +++ b/lib/markdownRenderer.tsx @@ -55,19 +55,19 @@ function processLine(line: string, index: number, state: RenderState, elements: function renderHeading(line: string, index: number, elements: JSX.Element[]): boolean { if (line.startsWith('# ')) { - elements.push(
{line}
) + elements.push({line}
) return } if (elements.length > 0) { @@ -118,7 +118,7 @@ function handleCodeBlock( ): void { if (state.inCodeBlock) { elements.push( -
+
{state.codeBlockContent.join('\n')}
)
@@ -137,7 +137,7 @@ function closeListIfNeeded(
): void {
if (state.currentList.length > 0 && !line.startsWith('- ') && !line.startsWith('* ') && line.trim() !== '') {
elements.push(
-
+
{codeMatch[1]}
)
@@ -227,7 +227,7 @@ function processBold(text: string, parts: (string | JSX.Element)[]): void {
const boldParts = text.split(/(\*\*[^*]+\*\*)/g)
boldParts.forEach((part, i) => {
if (part.startsWith('**') && part.endsWith('**')) {
- parts.push({part.slice(2, -2)})
+ parts.push({part.slice(2, -2)})
} else if (part) {
parts.push(part)
}