From 96a3bfeafbe3e46bdf3e217dd934b026bc1b9f9f Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sun, 20 Aug 2023 05:04:29 +0000
Subject: [PATCH] fix: put quotations around font
---
quartz/plugins/transformers/ofm.ts | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index 97054b1..b66ba85 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -9,7 +9,7 @@
import { JSResource } from "../../util/resources"
// @ts-ignore
import calloutScript from "../../components/scripts/callout.inline.ts"
-import { FilePath, canonicalizeServer, pathToRoot, slugTag, slugifyFilePath } from "../../util/path"
+import { FilePath, pathToRoot, slugTag, slugifyFilePath } from "../../util/path"
import { toHast } from "mdast-util-to-hast"
import { toHtml } from "hast-util-to-html"
import { PhrasingContent } from "mdast-util-find-and-replace/lib"
@@ -196,7 +196,7 @@
// embed cases
if (value.startsWith("!")) {
const ext: string = path.extname(fp).toLowerCase()
- const url = slugifyFilePath(fp as FilePath) + ext
+ const url = slugifyFilePath(fp as FilePath)
if ([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].includes(ext)) {
const dims = alias ?? ""
let [width, height] = dims.split("x", 2)
@@ -381,8 +381,7 @@
if (opts.parseTags) {
plugins.push(() => {
return (tree: Root, file) => {
- const slug = canonicalizeServer(file.data.slug!)
- const base = pathToRoot(slug)
+ const base = pathToRoot(file.data.slug!)
findAndReplace(tree, tagRegex, (value: string, tag: string) => {
if (file.data.frontmatter) {
file.data.frontmatter.tags.push(tag)
--
Gitblit v1.10.0