diff options
author | Case Duckworth | 2024-06-15 21:25:29 -0500 |
---|---|---|
committer | Case Duckworth | 2024-06-15 21:25:29 -0500 |
commit | e1d6e4678da17784c54f86eb2bf67a61bc385969 (patch) | |
tree | fd6126a5e0592b782bc999d2faf3eeb847c91cd1 /lib | |
parent | Update things (diff) | |
download | jimmy-e1d6e4678da17784c54f86eb2bf67a61bc385969.tar.gz jimmy-e1d6e4678da17784c54f86eb2bf67a61bc385969.zip |
Fix html filters
Diffstat (limited to 'lib')
-rw-r--r-- | lib/html.scm | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/lib/html.scm b/lib/html.scm index 26cdff4..9ed5957 100644 --- a/lib/html.scm +++ b/lib/html.scm | |||
@@ -28,37 +28,36 @@ | |||
28 | (char->tag "`" "code")) s)) | 28 | (char->tag "`" "code")) s)) |
29 | 29 | ||
30 | (set-formats! | 30 | (set-formats! |
31 | '((para (line . "~a~%") | 31 | '((para (line . "~a~%") |
32 | (stanza . "<p>~% ~a</p>~%")) | 32 | (stanza . "<p>~% ~a</p>~%")) |
33 | (verb (line . "~a~%") | 33 | (verb (line . "~a~%") |
34 | (stanza . "<pre><code>~a</code></pre>~%")) | 34 | (stanza . "<pre><code>~a</code></pre>~%")) |
35 | (link (line . "<li><a href=\"~a\">~a</a></li>~%") | 35 | (link (line . "<li><a href=\"~a\">~a</a></li>~%") |
36 | (stanza . "<ul>~% ~a</ul>~%") | 36 | (stanza . "<ul>~% ~a</ul>~%") |
37 | (inline . "<a href=\"~a\">~a</a>~%")) | 37 | (inline . "<a href=\"~a\">~a</a>~%")) |
38 | (list (line . "<li>~a</li>~%") | 38 | (list (line . "<li>~a</li>~%") |
39 | (stanza . "<ul>~% ~a</ul>~%")) | 39 | (stanza . "<ul>~% ~a</ul>~%")) |
40 | (quot (line . "~a~%") | 40 | (quot (line . "~a~%") |
41 | (stanza . "<blockquote>~% ~a</blockquote>~%")) | 41 | (stanza . "<blockquote>~% ~a</blockquote>~%")) |
42 | (hdr1 (line . "~a") | 42 | (hdr1 (line . "~a") |
43 | (stanza . "<h1>~a</h1>~%")) | 43 | (stanza . "<h1>~a</h1>~%")) |
44 | (hdr2 (line . "~a") | 44 | (hdr2 (line . "~a") |
45 | (stanza . "<h2>~a</h2>~%")) | 45 | (stanza . "<h2>~a</h2>~%")) |
46 | (hdr3 (line . "~a") | 46 | (hdr3 (line . "~a") |
47 | (stanza . "<h3>~a</h3>~%")))) | 47 | (stanza . "<h3>~a</h3>~%")))) |
48 | 48 | ||
49 | (set-filters! | 49 | (set-filters! |
50 | `((verb (line . ,identity) | 50 | `((verb (stanza . ,(o ensure-newline (cut string-join <> "\n")))) |
51 | (stanza . ,join-lines)) | 51 | (link (line . ,(lambda (ln) |
52 | (link (line . ,(lambda (ln) | 52 | (cons (car ln) |
53 | (cons (car ln) | 53 | ((o list |
54 | ((o list | 54 | add-inline-markup |
55 | add-inline-markup | 55 | escape-entities |
56 | escape-entities | 56 | string-join) |
57 | string-join) | 57 | (cdr ln)))))) |
58 | (cdr ln)))))) | 58 | (default |
59 | (default | 59 | (line . ,(o list |
60 | (line . ,(o list | 60 | add-inline-markup |
61 | add-inline-markup | 61 | escape-entities |
62 | escape-entities | 62 | string-join)) |
63 | string-join)) | 63 | (stanza . ,string-join)))) |
64 | (stanza . ,string-join)))) | ||