diff --git a/src/katla.dhall b/src/katla.dhall new file mode 100644 index 0000000..19d4d68 --- /dev/null +++ b/src/katla.dhall @@ -0,0 +1,23 @@ +{ font = "\\ttfamily" +, space = " " +, datacons = { style = "" + , colour = "#ed4a46"} +, typecons = { style = "" + , colour = "#368aeb"} +, bound = { style = "" + , colour = "#dedede"} +, function = { style = "" + , colour = "#70b433"} +, keyword = { style = "font-weight: bold;" + , colour = "#3fc5b7"} +, comment = { style = "" + , colour = "#777777"} +, hole = { style = "font-weight: bold;" + , colour = "#dbb32d" } +, namespce = { style = "font-style: italic;" + , colour = "#dedede"} +, postulte = { style = "font-weight: bold;" + , colour = "#ed4a46"} +, aModule = { style = "font-style: italic;" + , colour = "#dedede"} +} diff --git a/src/upload.raku b/src/upload.raku index 42baff4..4a4f944 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,34 +20,34 @@ 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(/'