From: Lady <redacted>
Date: Wed, 3 May 2023 01:50:34 +0000 (-0700)
Subject: Be more precise checking for date‐named directories
X-Git-Tag: 0.2.1^0
X-Git-Url: https://git.ladys.computer/Beorn/commitdiff_plain/9f2c90d3378fe8e25f2a8cc53b9640a3d30507e7?ds=inline;hp=20045528c0524e92050f05f13294f35911433d43

Be more precise checking for date‐named directories

Otherwise the script will pick up on any directory which _contains_ a
date, not just those which _are_ one.
---

diff --git a/build.js b/build.js
index aaa13ed..9ae91c9 100755
--- a/build.js
+++ b/build.js
@@ -1018,7 +1018,7 @@ await (async () => { // this is the run script
   ) {
     // Iterate over each directory and process the ones which are
     // dates.
-    if (!isDirectory || !/[0-9]{4}-[0-9]{2}-[0-9]{2}/u.test(date)) {
+    if (!isDirectory || !/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/u.test(date)) {
       // This isn’t a dated directory.
       continue;
     } else {