ignore: share page polish

This commit is contained in:
Jay V
2025-06-17 20:26:09 -04:00
parent 1c58023df9
commit d1f9311931
8 changed files with 368 additions and 587 deletions

View File

@@ -18,9 +18,9 @@ function CodeBlock(props: CodeBlockProps) {
const [local, rest] = splitProps(props, ["code", "lang", "onRendered"])
let containerRef!: HTMLDivElement
const [html] = createResource(async () => {
return (await codeToHtml(local.code, {
lang: local.lang || "text",
const [html] = createResource(() => [local.code, local.lang], async ([code, lang]) => {
return (await codeToHtml(code || "", {
lang: lang || "text",
themes: {
light: "github-light",
dark: "github-dark",