From ab80eba7941eb7dbf4944ec63d52e1bfc7925ddc Mon Sep 17 00:00:00 2001
From: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Date: Sat, 10 Feb 2024 22:19:17 +0000
Subject: [PATCH] chore(callouts): remove unnecessary whitespaces after class name (#833)

---
 quartz/components/pages/Content.tsx |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/quartz/components/pages/Content.tsx b/quartz/components/pages/Content.tsx
index 7490a7e..2e6416f 100644
--- a/quartz/components/pages/Content.tsx
+++ b/quartz/components/pages/Content.tsx
@@ -1,11 +1,11 @@
+import { htmlToJsx } from "../../util/jsx"
 import { QuartzComponentConstructor, QuartzComponentProps } from "../types"
-import { Fragment, jsx, jsxs } from "preact/jsx-runtime"
-import { toJsxRuntime } from "hast-util-to-jsx-runtime"
 
-function Content({ tree }: QuartzComponentProps) {
-  // @ts-ignore (preact makes it angry)
-  const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: "html" })
-  return <article class="popover-hint">{content}</article>
+function Content({ fileData, tree }: QuartzComponentProps) {
+  const content = htmlToJsx(fileData.filePath!, tree)
+  const classes: string[] = fileData.frontmatter?.cssclasses ?? []
+  const classString = ["popover-hint", ...classes].join(" ")
+  return <article class={classString}>{content}</article>
 }
 
 export default (() => Content) satisfies QuartzComponentConstructor

--
Gitblit v1.10.0