diff options
author | Arun Isaac | 2022-06-28 10:06:38 +0530 |
---|---|---|
committer | Arun Isaac | 2022-06-28 10:13:13 +0530 |
commit | 71ae09d9d34a1780c653755bbb4d6c1f5b67906a (patch) | |
tree | 707698ef54253d2051d6bd0a183947338f5de151 /tissue/issue.scm | |
parent | a5f905f8c0656c5ea8ee957a5abc2e0dc7aa0193 (diff) | |
download | tissue-71ae09d9d34a1780c653755bbb4d6c1f5b67906a.tar.gz tissue-71ae09d9d34a1780c653755bbb4d6c1f5b67906a.tar.lz tissue-71ae09d9d34a1780c653755bbb4d6c1f5b67906a.zip |
web: static: Move sanitize-string to (tissue issue).
* tissue/web/static.scm (sanitize-string): Move to tissue/issue.scm.
Diffstat (limited to 'tissue/issue.scm')
-rw-r--r-- | tissue/issue.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tissue/issue.scm b/tissue/issue.scm index 70ea49f..de01ca8 100644 --- a/tissue/issue.scm +++ b/tissue/issue.scm @@ -176,6 +176,14 @@ (newline) (newline))) +(define (sanitize-string str) + "Downcase STR and replace spaces with hyphens." + (string-map (lambda (c) + (case c + ((#\space) #\-) + (else c))) + (string-downcase str))) + (define (hashtable-append! hashtable key new-values) "Append NEW-VALUES to the list of values KEY is associated to in HASHTABLE. Deduplicate the resulting list if necessary. If KEY is not |