From 78b33fc2fb2d2b30e0cdf6fbd50c74efceac1c56 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 18 Dec 2023 00:46:17 +0000
Subject: [PATCH] fix: release build lock before client refresh

---
 quartz/components/Explorer.tsx |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/quartz/components/Explorer.tsx b/quartz/components/Explorer.tsx
index de6b5e0..95eac43 100644
--- a/quartz/components/Explorer.tsx
+++ b/quartz/components/Explorer.tsx
@@ -15,7 +15,12 @@
   sortFn: (a, b) => {
     // Sort order: folders first, then files. Sort folders and files alphabetically
     if ((!a.file && !b.file) || (a.file && b.file)) {
-      return a.displayName.localeCompare(b.displayName)
+      // numeric: true: Whether numeric collation should be used, such that "1" < "2" < "10"
+      // sensitivity: "base": Only strings that differ in base letters compare as unequal. Examples: a ≠ b, a = á, a = A
+      return a.displayName.localeCompare(b.displayName, undefined, {
+        numeric: true,
+        sensitivity: "base",
+      })
     }
     if (a.file && !b.file) {
       return 1
@@ -81,7 +86,7 @@
   function Explorer({ allFiles, displayClass, fileData }: QuartzComponentProps) {
     constructFileTree(allFiles)
     return (
-      <div class={`explorer ${displayClass}`}>
+      <div class={`explorer ${displayClass ?? ""}`}>
         <button
           type="button"
           id="explorer"

--
Gitblit v1.10.0