From: Lady 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 X-Git-Url: https://git.ladys.computer/Beorn/commitdiff_plain/f3ed77e180a2c77191f9be34996b70b656a2191a 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 {