aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/src/components
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2026-01-15 18:22:43 +0800
committerHsiangNianian <i@jyunko.cn>2026-01-15 18:22:43 +0800
commitff358c3456435998e14f7337f4542deeaeb59bad (patch)
treeff98adcbd7eb916fbb7fa22ef8fe19a5e265d49b /ui/src/components
parent314ce0e656107ab43a8e8681d85525a551f83f21 (diff)
downloadDropOut-ff358c3456435998e14f7337f4542deeaeb59bad.tar.gz
DropOut-ff358c3456435998e14f7337f4542deeaeb59bad.zip
feat: Enhance text formatting in HomeView by adding support for italicized text using single asterisks
Diffstat (limited to 'ui/src/components')
-rw-r--r--ui/src/components/HomeView.svelte1
1 files changed, 1 insertions, 0 deletions
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>');