From 9d2024b11c7c24ec8112b5019504fc44b4e1a297 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Tue, 13 Jun 2023 05:41:42 +0000
Subject: [PATCH] taglist, mermaid

---
 quartz/path.ts |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/quartz/path.ts b/quartz/path.ts
index bece770..87f1a9d 100644
--- a/quartz/path.ts
+++ b/quartz/path.ts
@@ -1,7 +1,5 @@
 import path from 'path'
-import SlugAnchor from 'github-slugger'
-
-export const slugAnchor = new SlugAnchor()
+import { slug as slugAnchor } from 'github-slugger'
 
 function slugSegment(s: string): string {
   return s.replace(/\s/g, '-')
@@ -9,7 +7,7 @@
 
 export function slugify(s: string): string {
   const [fp, anchor] = s.split("#", 2)
-  const sluggedAnchor = anchor === undefined ? "" : "#" + slugAnchor.slug(anchor)
+  const sluggedAnchor = anchor === undefined ? "" : "#" + slugAnchor(anchor)
   const withoutFileExt = fp.replace(new RegExp(path.extname(fp) + '$'), '')
   const rawSlugSegments = withoutFileExt.split(path.sep)
   const slugParts: string = rawSlugSegments

--
Gitblit v1.10.0