summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2022-03-17 14:19:45 +0530
committerArun Isaac2022-03-18 16:23:23 +0530
commit87175a77e34e7caeee0db2b245aa846a41bdf8c1 (patch)
tree7271107c09efba8b70117d64b65accda29103aca
parent4b5d60c64d8968ee5197956c2f7dee70bd48e79c (diff)
downloadtissue-87175a77e34e7caeee0db2b245aa846a41bdf8c1.tar.gz
tissue-87175a77e34e7caeee0db2b245aa846a41bdf8c1.tar.lz
tissue-87175a77e34e7caeee0db2b245aa846a41bdf8c1.zip
web: Join lines when reading gemtext.
* tissue/web.scm (build-website): Pass `#:join-lines? #t' to the
gemtext reader.
-rw-r--r--tissue/web.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/tissue/web.scm b/tissue/web.scm
index 0a07a34..a3fccbd 100644
--- a/tissue/web.scm
+++ b/tissue/web.scm
@@ -257,12 +257,14 @@ issue listings are not generated."
                              (if (file-exists? input-file)
                                  (call-with-input-file input-file
                                    (cut evaluate-ast-from-port <>
-                                        #:reader ((reader:make (lookup-reader
-                                                                (cond
-                                                                 ((string-suffix? ".gmi" input-file)
-                                                                  'gemtext)
-                                                                 ((string-suffix? ".skb" input-file)
-                                                                  'skribe)))))))
+                                        ;; Relax the gemtext standard
+                                        ;; by joining adjacent lines.
+                                        #:reader (cond
+                                                  ((string-suffix? ".gmi" input-file)
+                                                   ((reader:make (lookup-reader 'gemtext))
+                                                    #:join-lines? #t))
+                                                  ((string-suffix? ".skb" input-file)
+                                                   ((reader:make (lookup-reader 'skribe)))))))
                                  (raise (issue-file-not-found-error input-file)))
                              (find-engine 'html)))
                       (copy-file input-file output-file))))))