From: Lady Date: Sat, 23 Sep 2023 23:48:30 +0000 (-0400) Subject: Allow negative years in timelines X-Git-Tag: 0.4.1~1 X-Git-Url: https://git.ladys.computer/GitWikiWeb/commitdiff_plain/65f9d69c7581aeb36698a6eee627edc80bf6054d?ds=inline Allow negative years in timelines --- diff --git a/build.js b/build.js index 2381a51..97bb702 100644 --- a/build.js +++ b/build.js @@ -257,7 +257,7 @@ class GitWikiWebPage { return { label: text, year: - /^([0-9X]{4})(?:-[0-9X]{2}(?:-[0-9X]{2})?)?$/u + /^(-?[0-9X]{4})(?:-[0-9X]{2}(?:-[0-9X]{2})?)?$/u .exec(text)?.[1] ?? text, }; }