From d4c122646ccd6fc989b4436e16b2dffdc931dee6 Mon Sep 17 00:00:00 2001
From: Ben Schlegel <31989404+benschlegel@users.noreply.github.com>
Date: Thu, 28 Sep 2023 15:39:44 +0000
Subject: [PATCH] fix(explorer): default sortFn implementation (#511)

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

diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index 8306f40..4d55eda 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -400,6 +400,10 @@
           return (tree: Root, file) => {
             const base = pathToRoot(file.data.slug!)
             findAndReplace(tree, tagRegex, (_value: string, tag: string) => {
+              // Check if the tag only includes numbers
+              if (/^\d+$/.test(tag)) {
+                return false
+              }
               tag = slugTag(tag)
               if (file.data.frontmatter && !file.data.frontmatter.tags.includes(tag)) {
                 file.data.frontmatter.tags.push(tag)

--
Gitblit v1.10.0