From 57ac48e167fd8fd09686424ccf3f62b60191f8af Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 20 Dec 2024 10:38:33 +0000 Subject: [PATCH] Don't use Dom::Tiny --- src/upload.raku | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/upload.raku b/src/upload.raku index 42baff4..09e1b98 100755 --- a/src/upload.raku +++ b/src/upload.raku @@ -2,7 +2,6 @@ use paths; use File::Temp; -use DOM::Tiny; use HTML::Lazy (:ALL); my $build-path; @@ -21,18 +20,12 @@ body { # Stylize katla output sub stylize($katla-output) { - my $dom = DOM::Tiny.parse($katla-output); - # Insert our background css - $dom.find('style')[*-1][*-1].prepend($background-css); - # Undomify - my $output = $dom.Str; # Apply regex edits to colorize existing elements - $output = - $output.match(/'color: darkgray'/).replace-with('color: #dedede') - .match(/'color: lightgrey'/).replace-with('color: #777777') - .match(/'color: yellow'/).replace-with('color: #3b3b3b') - .match(/'color: gray'/).replace-with('color: #777777'); - $output + $katla-output.match(/'color: darkgray'/).replace-with('color: #dedede') + .match(/'color: lightgrey'/).replace-with('color: #777777') + .match(/'color: yellow'/).replace-with('color: #3b3b3b') + .match(/'color: gray'/).replace-with('color: #777777') + .match(/'