about summary refs log tree commit diff stats
path: root/lib/html.scm
diff options
context:
space:
mode:
authorCase Duckworth2024-06-15 21:17:03 -0500
committerCase Duckworth2024-06-15 21:17:03 -0500
commit703e9e93087d32364087a0ebc9e315869b70ff7c (patch)
treede5cfdd1a687dbe68686929497e870fad5f28800 /lib/html.scm
parentWrite executable (diff)
downloadjimmy-703e9e93087d32364087a0ebc9e315869b70ff7c.tar.gz
jimmy-703e9e93087d32364087a0ebc9e315869b70ff7c.zip
Update things
Diffstat (limited to 'lib/html.scm')
-rw-r--r--lib/html.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/html.scm b/lib/html.scm index 07cd921..26cdff4 100644 --- a/lib/html.scm +++ b/lib/html.scm
@@ -3,7 +3,10 @@
3(import scheme (chicken base) 3(import scheme (chicken base)
4 (chicken irregex) 4 (chicken irregex)
5 (jimmy emit) 5 (jimmy emit)
6 (jimmy util)) 6 (jimmy util)
7 utf8-srfi-13)
8
9(output-type 'html)
7 10
8(define (escape-entities s) 11(define (escape-entities s)
9 (irregex-replace/all "[&<>]" s 12 (irregex-replace/all "[&<>]" s
@@ -24,7 +27,7 @@
24 (char->tag "_" "i") 27 (char->tag "_" "i")
25 (char->tag "`" "code")) s)) 28 (char->tag "`" "code")) s))
26 29
27(formats 30(set-formats!
28 '((para (line . "~a~%") 31 '((para (line . "~a~%")
29 (stanza . "<p>~% ~a</p>~%")) 32 (stanza . "<p>~% ~a</p>~%"))
30 (verb (line . "~a~%") 33 (verb (line . "~a~%")
@@ -43,7 +46,7 @@
43 (hdr3 (line . "~a") 46 (hdr3 (line . "~a")
44 (stanza . "<h3>~a</h3>~%")))) 47 (stanza . "<h3>~a</h3>~%"))))
45 48
46(filters 49(set-filters!
47 `((verb (line . ,identity) 50 `((verb (line . ,identity)
48 (stanza . ,join-lines)) 51 (stanza . ,join-lines))
49 (link (line . ,(lambda (ln) 52 (link (line . ,(lambda (ln)