From ff358c3456435998e14f7337f4542deeaeb59bad Mon Sep 17 00:00:00 2001
From: HsiangNianian <i@jyunko.cn>
Date: Thu, 15 Jan 2026 18:22:43 +0800
Subject: feat: Enhance text formatting in HomeView by adding support for
 italicized text using single asterisks

---
 ui/src/components/HomeView.svelte | 1 +
 1 file changed, 1 insertion(+)

(limited to 'ui/src/components/HomeView.svelte')

diff --git a/ui/src/components/HomeView.svelte b/ui/src/components/HomeView.svelte
index 7bb7e44..5119d00 100644
--- a/ui/src/components/HomeView.svelte
+++ b/ui/src/components/HomeView.svelte
@@ -65,6 +65,7 @@
           // Formatting helper
           const formatLine = (text: string) => text
               .replace(/\*\*(.*?)\*\*/g, '<strong class="text-zinc-200">$1</strong>')
+              .replace(/(?<!\*)\*([^*]+)\*(?!\*)/g, '<em class="text-zinc-400 italic">$1</em>')
               .replace(/`([^`]+)`/g, '<code class="bg-zinc-800 px-1 py-0.5 rounded text-xs text-zinc-300 font-mono border border-white/5 break-all whitespace-normal">$1</code>')
               .replace(/\[(.*?)\]\((.*?)\)/g, '<a href="$2" target="_blank" class="text-indigo-400 hover:text-indigo-300 hover:underline decoration-indigo-400/30 break-all">$1</a>');
 
-- 
cgit v1.2.3-70-g09d2

