From 2f5fd47f23ef7cd85d42316fbe9ddc74ed4335e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EA=B9=80=EC=98=81=EC=A4=80E?=
<105265001+flex-yj-kim@users.noreply.github.com>
Date: Sun, 8 Mar 2026 00:07:37 +0900
Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20render=20links=20inside?=
=?UTF-8?q?=20bold/italic=20via=20recursive=20InlineMarkdown=20(#236)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bold-wrapped links like **[text](url)** were rendered as plain bold text
because the bold regex matched first and treated inner content as a string.
Fix: recurse into InlineMarkdown for bold/italic inner content so nested
markdown (links, code, etc.) is properly parsed.
Affected:
- Viewer.tsx (main plan view)
- PlanCleanDiffView.tsx (diff view duplicate)
---
packages/editor/App.tsx | 2 +-
packages/ui/components/Viewer.tsx | 4 ++--
packages/ui/components/plan-diff/PlanCleanDiffView.tsx | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/packages/editor/App.tsx b/packages/editor/App.tsx
index 60a613c..10c5167 100644
--- a/packages/editor/App.tsx
+++ b/packages/editor/App.tsx
@@ -56,7 +56,7 @@ import type { PlanDiffMode } from '@plannotator/ui/components/plan-diff/PlanDiff
const PLAN_CONTENT = `# Implementation Plan: Real-time Collaboration
## Overview
-Add real-time collaboration features to the editor using WebSocket connections and operational transforms.
+Add real-time collaboration features to the editor using **[WebSocket API](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)** and *[operational transforms](https://en.wikipedia.org/wiki/Operational_transformation)*.
### Architecture
diff --git a/packages/ui/components/Viewer.tsx b/packages/ui/components/Viewer.tsx
index 0ebf05e..a1b8ab0 100644
--- a/packages/ui/components/Viewer.tsx
+++ b/packages/ui/components/Viewer.tsx
@@ -955,7 +955,7 @@ const InlineMarkdown: React.FC<{ text: string; onOpenLinkedDoc?: (path: string)
// Bold: **text**
let match = remaining.match(/^\*\*(.+?)\*\*/);
if (match) {
- parts.push({match[1]});
+ parts.push();
remaining = remaining.slice(match[0].length);
continue;
}
@@ -963,7 +963,7 @@ const InlineMarkdown: React.FC<{ text: string; onOpenLinkedDoc?: (path: string)
// Italic: *text*
match = remaining.match(/^\*(.+?)\*/);
if (match) {
- parts.push({match[1]});
+ parts.push();
remaining = remaining.slice(match[0].length);
continue;
}
diff --git a/packages/ui/components/plan-diff/PlanCleanDiffView.tsx b/packages/ui/components/plan-diff/PlanCleanDiffView.tsx
index 9f6acb3..2c31217 100644
--- a/packages/ui/components/plan-diff/PlanCleanDiffView.tsx
+++ b/packages/ui/components/plan-diff/PlanCleanDiffView.tsx
@@ -299,7 +299,7 @@ const InlineMarkdown: React.FC<{ text: string }> = ({ text }) => {
if (match) {
parts.push(
- {match[1]}
+
);
remaining = remaining.slice(match[0].length);
@@ -308,7 +308,7 @@ const InlineMarkdown: React.FC<{ text: string }> = ({ text }) => {
match = remaining.match(/^\*(.+?)\*/);
if (match) {
- parts.push({match[1]});
+ parts.push();
remaining = remaining.slice(match[0].length);
continue;
}
--
knotmirror 0.0.1