summaryrefslogtreecommitdiff
path: root/tissue
diff options
context:
space:
mode:
authorArun Isaac2022-07-07 02:19:25 +0530
committerArun Isaac2022-07-07 02:26:08 +0530
commitf783abafa220124817a2782430cb63c9f3511d15 (patch)
treec0e26281ec48314cbd573a44ce40e6f3ddafc927 /tissue
parentdc6e932000730ede3c23a270390db9482953b41a (diff)
downloadtissue-f783abafa220124817a2782430cb63c9f3511d15.tar.gz
tissue-f783abafa220124817a2782430cb63c9f3511d15.tar.lz
tissue-f783abafa220124817a2782430cb63c9f3511d15.zip
issue: Parse known keys in list lines even if they are long.
We drop the restriction that values in key-value pairs should be 2 words or less. Instead, if the key is a known key such as "keywords:", "tags:" or "status:", we always accept it as a key. * tissue/issue.scm (file-details): Parse known keys in list lines even if they are long. * tests/issue.scm ("Parse keywords even if they are long"): New test.
Diffstat (limited to 'tissue')
-rw-r--r--tissue/issue.scm11
1 files changed, 1 insertions, 10 deletions
diff --git a/tissue/issue.scm b/tissue/issue.scm
index 905e937..f5becf6 100644
--- a/tissue/issue.scm
+++ b/tissue/issue.scm
@@ -325,16 +325,7 @@ gemtext file."
(hashtable-update! result 'tasks 1+ 0)
(unless (string=? (match:substring m 1) " ")
(hashtable-update! result 'completed-tasks 1+ 0))))
- ((let ((alist (list-line->alist line)))
- (and alist
- ;; Every value string is 2
- ;; words or less.
- (every (match-lambda
- ((_ . values)
- (every (cut <=n-words? <> 2)
- values)))
- alist)
- alist))
+ ((list-line->alist line)
=> (lambda (alist)
;; Insert values based on
;; their keys.