From f290d7c2c74868c2218a3b3cb8844fdba56d4a35 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 29 Nov 2022 10:19:11 +0100 Subject: [PATCH] Allow tt in comments, class in pre --- tekuti/filters.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tekuti/filters.scm b/tekuti/filters.scm index 2361010..bccf992 100644 --- a/tekuti/filters.scm +++ b/tekuti/filters.scm @@ -94,6 +94,9 @@ (define (marxdown->sxml text) (smarxdown->shtml (call-with-input-string text marxdown->smarxdown))) +(define (pre-class? class) + (string-prefix? "pre-" class)) + (define *allowed-tags* `((a (href . ,urlish?) title) (abbr title) @@ -105,9 +108,10 @@ (em) (i) (p) - (pre) + (pre (class . ,pre-class?)) (strike) - (strong))) + (strong) + (tt))) (define (compile-sxslt-rules tags) (define (ok . body)