From 60b3bc34cb07b5bec87cbd667ea9f804ff14cf3c Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sun, 22 Oct 2023 04:06:02 +0000
Subject: [PATCH] fix: catch html to jsx errors (closes #547)
---
quartz/plugins/transformers/ofm.ts | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index 4d55eda..226e939 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -14,6 +14,7 @@
import { toHast } from "mdast-util-to-hast"
import { toHtml } from "hast-util-to-html"
import { PhrasingContent } from "mdast-util-find-and-replace/lib"
+import { capitalize } from "../../util/lang"
export interface Options {
comments: boolean
@@ -104,10 +105,6 @@
return calloutMapping[callout] ?? "note"
}
-const capitalize = (s: string): string => {
- return s.substring(0, 1).toUpperCase() + s.substring(1)
-}
-
// !? -> optional embedding
// \[\[ -> open brace
// ([^\[\]\|\#]+) -> one or more non-special characters ([,],|, or #) (name)
--
Gitblit v1.10.0