From d1df6854fb487ce42150e6c7c393279f1c4f0ab5 Mon Sep 17 00:00:00 2001
From: Arun Isaac
Date: Sun, 22 Jan 2023 22:38:58 +0000
Subject: issues: Allow checkboxes without a space.

* issues/allow-checkboxes-without-a-space.gmi: New file.
* tissue/issue.scm (file-details): Add TODO note.
---
 issues/allow-checkboxes-without-a-space.gmi | 12 ++++++++++++
 tissue/issue.scm                            |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 issues/allow-checkboxes-without-a-space.gmi

diff --git a/issues/allow-checkboxes-without-a-space.gmi b/issues/allow-checkboxes-without-a-space.gmi
new file mode 100644
index 0000000..c8d93d1
--- /dev/null
+++ b/issues/allow-checkboxes-without-a-space.gmi
@@ -0,0 +1,12 @@
+# Allow checkboxes without a space
+
+* tags: bug
+
+Checkboxes without a space in them are not detected correctly by our issue gemtext parser. They should be.
+
+In the example below, the first checklist item is not detected correctly.
+```
+* [] Checkbox without a space
+* [ ] Checkbox with a space
+* [x] Completed checkbox
+```
diff --git a/tissue/issue.scm b/tissue/issue.scm
index e20b4d0..6000ebd 100644
--- a/tissue/issue.scm
+++ b/tissue/issue.scm
@@ -1,5 +1,5 @@
 ;;; tissue --- Text based issue tracker
-;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2022 Frederick Muriuki Muriithi <fredmanglis@gmail.com>
 ;;;
 ;;; This file is part of tissue.
@@ -215,6 +215,7 @@ gemtext file."
                              ;; checkbox has any character other
                              ;; than space in it, the task is
                              ;; completed.
+                             ;; TODO: Allow [] and not just [ ] (that is, without a space).
                              ((string-match "^\\* \\[(.)\\]" line)
                               => (lambda (m)
 				   (hashtable-update! result 'tasks 1+ 0)
-- 
cgit v1.2.3