From c402f0c3857a75cc101c3459866c94e646fd2957 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 05 Aug 2023 18:28:09 +0000
Subject: [PATCH] more robust error handling, config hotreload

---
 quartz/plugins/transformers/ofm.ts |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index a9beda4..13a32ca 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -184,7 +184,7 @@
 
               // embed cases
               if (value.startsWith("!")) {
-                const ext: string | undefined = path.extname(fp).toLowerCase()
+                const ext: string = path.extname(fp).toLowerCase()
                 const url = slugifyFilePath(fp as FilePath) + ext
                 if ([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].includes(ext)) {
                   const dims = alias ?? ""
@@ -218,8 +218,8 @@
                     type: "html",
                     value: `<iframe src="${url}"></iframe>`,
                   }
-                } else {
-                  // TODO: this is the node embed case
+                } else if (ext === "") {
+                  // TODO: note embed
                 }
                 // otherwise, fall through to regular link
               }

--
Gitblit v1.10.0