From 5fcba1bfaf8821fbb01cc7e67e01c553ffebfa39 Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 19 Jul 2024 17:02:03 +0000
Subject: [PATCH] chore(deps): bump mdast-util-to-hast from 13.1.0 to 13.2.0 (#1279)

---
 quartz/plugins/transformers/toc.ts |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/quartz/plugins/transformers/toc.ts b/quartz/plugins/transformers/toc.ts
index 4c31d20..bfc2f98 100644
--- a/quartz/plugins/transformers/toc.ts
+++ b/quartz/plugins/transformers/toc.ts
@@ -6,7 +6,7 @@
 
 export interface Options {
   maxDepth: 1 | 2 | 3 | 4 | 5 | 6
-  minEntries: 1
+  minEntries: number
   showByDefault: boolean
   collapseByDefault: boolean
 }
@@ -52,7 +52,7 @@
                 }
               })
 
-              if (toc.length > opts.minEntries) {
+              if (toc.length > 0 && toc.length > opts.minEntries) {
                 file.data.toc = toc.map((entry) => ({
                   ...entry,
                   depth: entry.depth - highestDepth,

--
Gitblit v1.10.0