Syntax highlighting.
h3rald h3rald@h3rald.com
Sat, 17 Feb 2024 18:01:11 +0100
2 files changed,
5 insertions(+),
6 deletions(-)
M
assets/styles/style.css
→
assets/styles/style.css
@@ -577,7 +577,6 @@ }
code, pre { - /*background-color: var(--secondary-background);*/ font-size: 0.8rem; }
M
rules.min
→
rules.min
@@ -104,12 +104,12 @@ (
symbol process-code (str :text ==> str :result) ( - "echo \"$#\" | chroma --html --html-only --html-prevent-surrounding-pre" :cmd - text "<code[^>]*>([\s\S]+?)</code>" ( + "echo \"$#\" | chroma --html --html-only" :cmd + text "<pre>\s*<code[^>]*>([\s\S]+?)</code></pre>" ( :match match 1 get escape :code - cmd (code) =% run /output :out - "<code class=\"chroma\">$#</code>" (out) =% + cmd (code) =% run /output puts ;:out + ;"<code class=\"chroma\">$#</code>" (out) =% ) replace-apply @result )@@ -217,7 +217,7 @@ ) ^process-css-asset
;;;;; MAIN ;;;;; -#| +;#| ; Process all contents contents ( :content