Parsing of month comments.

This commit is contained in:
Dominik Pantůček 2023-03-27 17:05:56 +02:00
parent f06949b545
commit 58f6391345
2 changed files with 13 additions and 1 deletions

View file

@ -65,7 +65,10 @@
(foldl (lambda (mr value)
(member-record-sub-prepend
mr output kind
(list marker (string->month (car value)) (cdr value))))
(let* ((mspec (string-first+rest (car value)))
(month (string->month (car mspec)))
(comment (cdr mspec)))
(list marker month (cdr value) comment))))
mr value)))
(else
(member-record-sub-set mr output key value)))))

View file

@ -85,6 +85,15 @@
(test-equal? string-repeat
(string-repeat "š" 4)
"šššš")
(test-equal? string-first+rest
(string-first+rest "asdf rest")
'("asdf" . "rest"))
(test-equal? string-first+rest
(string-first+rest "asdf rest test rest")
'("asdf" . "rest test rest"))
(test-equal? string-first+rest
(string-first+rest "asdf")
'("asdf" . ""))
))
)