mermaid loading improved

This commit is contained in:
2026-04-03 14:07:27 -04:00
parent 9c48bc61c0
commit 67bf77815e
3 changed files with 12 additions and 4 deletions

View File

@@ -292,6 +292,10 @@ export default function PostPage() {
return str.includes("<code") && str.includes("</code>");
};
const hasMermaid = (str: string): boolean => {
return str.includes('data-type="mermaid"');
};
return (
<Show
when={data()}
@@ -454,6 +458,7 @@ export default function PostPage() {
<PostBodyClient
body={p().body}
hasCodeBlock={hasCodeBlock(p().body)}
hasMermaid={hasMermaid(p().body)}
/>
<div