diff options
author | Arun Isaac | 2023-08-26 15:17:05 +0100 |
---|---|---|
committer | Arun Isaac | 2023-08-29 17:08:46 +0100 |
commit | 33255a1dca0deeb5fed2966b03dc64658e8535b3 (patch) | |
tree | 4a5b7c3f7a270464ed173c7c3479eabf95a55022 /src | |
parent | ccfbf97f6b42383bd0f0bfc14b05d2a37375f8d5 (diff) | |
download | skribilo-33255a1dca0deeb5fed2966b03dc64658e8535b3.tar.gz skribilo-33255a1dca0deeb5fed2966b03dc64658e8535b3.tar.lz skribilo-33255a1dca0deeb5fed2966b03dc64658e8535b3.zip |
html: Remove redundant pair? check on inline CSS.
The inline-css engine custom is either a string or a list. If it is a
string, we coerce it into a singleton list. So, there is no need to
check again that it is a pair.
* src/guile/skribilo/engine/html.scm (&html-header-style): Remove
redundant pair? check on inline CSS.
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/engine/html.scm | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index 65eb9a9..991050b 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -865,28 +865,26 @@ unspecified or #f values are ignored." (markup-writer '&html-header-style :before " <style type=\"text/css\">\n <!--\n" :action (lambda (node engine) - (let ((icss (let ((ic (engine-custom engine 'inline-css))) - (if (string? ic) - (list ic) - ic)))) - (display " pre { font-family: monospace }\n") - (display " tt { font-family: monospace }\n") - (display " code { font-family: monospace }\n") - (display " p.flushright { text-align: right }\n") - (display " p.flushleft { text-align: left }\n") - (display " span.sc { font-variant: small-caps }\n") - (display " span.sf { font-family: sans-serif }\n") - (display " span.skribetitle { font-family: sans-serif; font-weight: bolder; font-size: x-large; }\n") - (display " li.skribilo-toc-item::marker { content: attr(skribilo-toc-item-marker) }\n") - (when (pair? icss) - (for-each (lambda (css) - (display (guard (c (else (skribe-error - 'html-css - "Can't open CSS file for input" - css))) - (call-with-input-file css - get-string-all)))) - icss)))) + (display " pre { font-family: monospace }\n") + (display " tt { font-family: monospace }\n") + (display " code { font-family: monospace }\n") + (display " p.flushright { text-align: right }\n") + (display " p.flushleft { text-align: left }\n") + (display " span.sc { font-variant: small-caps }\n") + (display " span.sf { font-family: sans-serif }\n") + (display " span.skribetitle { font-family: sans-serif; font-weight: bolder; font-size: x-large; }\n") + (display " li.skribilo-toc-item::marker { content: attr(skribilo-toc-item-marker) }\n") + (for-each (lambda (css) + (display (guard (c (else (skribe-error + 'html-css + "Can't open CSS file for input" + css))) + (call-with-input-file css + get-string-all)))) + (let ((inline-css (engine-custom engine 'inline-css))) + (if (string? inline-css) + (list inline-css) + inline-css)))) :after " -->\n </style>\n") (markup-writer '&html-header-javascript |