From ef12faf72dd7c1a1297168b4a7c37b04c32d0c3b Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Tue, 15 Nov 2022 20:45:44 +1300 Subject: [PATCH] Uncollapse more wiki sections --- src/page-wiki.rkt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/page-wiki.rkt b/src/page-wiki.rkt index a0a2944..b2028d6 100644 --- a/src/page-wiki.rkt +++ b/src/page-wiki.rkt @@ -205,6 +205,16 @@ attributes) ;; children ((compose1 + ; more uncollapsing - sample: bandori/wiki/BanG_Dream!_Wikia + (curry u + (λ (v) (has-class? "mw-collapsible-content" attributes)) + (λ (v) (for/list ([element v]) + (u (λ (element) (pair? element)) + (λ (element) + `(,(car element) + (@ ,@(attribute-maybe-update 'style (λ (a) (regexp-replace #rx"display: *none" a "display:inline")) (bits->attributes element))) + ,@(filter element-is-content? (cdr element)))) + element)))) ; wrap blinking animated images in a slot so they can be animated with CSS (curry u (λ (v) (and (has-class? "animated" attributes)