diff options
author | Arun Isaac | 2023-04-15 13:39:07 +0100 |
---|---|---|
committer | Arun Isaac | 2023-04-15 13:45:30 +0100 |
commit | ec825e7abc430c2389f9af46cccdfc2be585a90a (patch) | |
tree | ef7ccd4739dc5971aa9d01ffdef273821183735c /tissue | |
parent | 1da3680f56890f8adc2d512884526cc8d3f9bdb6 (diff) | |
download | tissue-ec825e7abc430c2389f9af46cccdfc2be585a90a.tar.gz tissue-ec825e7abc430c2389f9af46cccdfc2be585a90a.tar.lz tissue-ec825e7abc430c2389f9af46cccdfc2be585a90a.zip |
issue: Allow checkboxes without a space.
* tissue/issue.scm (file-details): Allow checkboxes without a space.
* tests/issue.scm ("Allow checkboxes without a space"): New test.
* issues/allow-checkboxes-without-a-space.gmi: Close issue.
Diffstat (limited to 'tissue')
-rw-r--r-- | tissue/issue.scm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tissue/issue.scm b/tissue/issue.scm index 1953cef..fd4a852 100644 --- a/tissue/issue.scm +++ b/tissue/issue.scm @@ -221,11 +221,10 @@ 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) + ((string-match "^\\* \\[(.*)\\]" line) => (lambda (m) (hashtable-update! result 'tasks 1+ 0) - (unless (string=? (match:substring m 1) " ") + (unless (string-blank? (match:substring m 1)) (hashtable-update! result 'completed-tasks 1+ 0)))) ((list-line->alist line) => (lambda (alist) |