summaryrefslogtreecommitdiff
path: root/lib/Katana/HTML
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2022-04-20 11:01:33 +0100
committerPaul Buetow <paul@buetow.org>2022-04-20 11:01:33 +0100
commit4f9ed2f3e82b70aaccbf652bb5fd5bba472da8a7 (patch)
treede9ad290aea085d282ccb9eca30b08511d6ec4f1 /lib/Katana/HTML
parent6b0d4ee051f650b46af7ec50acf1122d44088fb5 (diff)
refactor
Diffstat (limited to 'lib/Katana/HTML')
-rw-r--r--lib/Katana/HTML/Generate.rakumod19
-rw-r--r--lib/Katana/HTML/Tag.rakumod24
2 files changed, 0 insertions, 43 deletions
diff --git a/lib/Katana/HTML/Generate.rakumod b/lib/Katana/HTML/Generate.rakumod
index fb020b4..74e1c4b 100644
--- a/lib/Katana/HTML/Generate.rakumod
+++ b/lib/Katana/HTML/Generate.rakumod
@@ -1,22 +1,3 @@
use v6.d;
unit module Katana::HTML::Generate:api<1>;
-
-multi sub generate-from-tags(Str $doctype, @tags) is export {
- say $doctype;
- generate-from-tags @tags;
-}
-
-multi sub generate-from-tags(@tags) is export {
- my @sgat; # tags spelled in reverse.
- for @tags -> $tag {
- say $tag.open;
- say $tag.text if $tag.has-text;
- unshift @sgat, $tag;
- }
- for @sgat -> $tag {
- say $tag.close;
- generate-from-tags $tag.succ if $tag.has-succ;
- }
-}
-
diff --git a/lib/Katana/HTML/Tag.rakumod b/lib/Katana/HTML/Tag.rakumod
deleted file mode 100644
index 772a577..0000000
--- a/lib/Katana/HTML/Tag.rakumod
+++ /dev/null
@@ -1,24 +0,0 @@
-use v6.d;
-unit module Katana::HTML:api<1>;
-
-class Tag is export {
- has Str $.name;
- has Str $.text;
- has Str %.params;
- has Tag @.succ;
-
- method has-text returns Bool { defined $.text }
- method has-succ returns Bool { defined $.succ }
-
- method open returns Str { "<{$.name}{self.params}>" }
- method close returns Str { "</{$.name}>" }
-
- method params returns Str {
- return '' unless defined %!params;
- my @params;
- for %!params.kv -> $key, $val {
- push @params, " $key='$val'";
- }
- return @params.join;
- }
-}