From a752fdc2f4bb07a81102eb253f4bdb5979207ac5 Mon Sep 17 00:00:00 2001 From: hyper Date: Sat, 12 Sep 2026 19:48:28 +0800 Subject: [PATCH] fix(DocDialog): Render doc bodies as markdown DocContent rendered the raw body in a whitespace-pre-wrap div, so markdown syntax and fenced code blocks appeared literally. Parse through the shared markdown pipeline and style with prose. Wrap the content in an
so md-bg and md-border, which resolve element.closest("article"), get a valid style target instead of throwing. --- src/components/DocDialog.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/DocDialog.tsx b/src/components/DocDialog.tsx index a2ec717..8212680 100644 --- a/src/components/DocDialog.tsx +++ b/src/components/DocDialog.tsx @@ -8,6 +8,7 @@ import { } from "solid-js"; import { docEntries, type DocEntry } from "./doc-data"; import { journalDocEntries, type JournalDocEntry } from "./journal-doc-data"; +import { parseMarkdown } from "../markdown"; type DocSet = "directives" | "journal"; type AnyEntry = DocEntry | JournalDocEntry; @@ -166,9 +167,10 @@ const DocContent: Component<{ entry: AnyEntry }> = (props) => { {e.icon} {e.title} -
- {e.body} -
+
); };