From 5232d09af520e12bc421cf19ae5d231a7e36cd4d Mon Sep 17 00:00:00 2001
From: ArtfulAzeria <146041757+ArtfulAzeria@users.noreply.github.com>
Date: Fri, 29 Sep 2023 18:17:48 +0000
Subject: [PATCH] feat: Better and more responsive tag behavior (#515)
---
quartz/plugins/vfile.ts | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/quartz/plugins/vfile.ts b/quartz/plugins/vfile.ts
index 9df3192..068981a 100644
--- a/quartz/plugins/vfile.ts
+++ b/quartz/plugins/vfile.ts
@@ -1,5 +1,12 @@
-import { Node } from 'hast'
-import { Data, VFile } from 'vfile/lib'
+import { Node, Parent } from "hast"
+import { Data, VFile } from "vfile"
export type QuartzPluginData = Data
export type ProcessedContent = [Node<QuartzPluginData>, VFile]
+
+export function defaultProcessedContent(vfileData: Partial<QuartzPluginData>): ProcessedContent {
+ const root: Parent = { type: "root", children: [] }
+ const vfile = new VFile("")
+ vfile.data = vfileData
+ return [root, vfile]
+}
--
Gitblit v1.10.0