We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 412f6c0 commit f382bbcCopy full SHA for f382bbc
lib/Pod/Htmlify.pm6
@@ -18,7 +18,9 @@ constant badchars = qw[$ / \ . % ? & = # + " ' : ~ < >];
18
my \goodnames = badchars.map: '$' ~ *.uniname.subst(' ', '_', :g);
19
constant length = badchars.elems;
20
21
-sub escape-filename($s is copy) is export {
+use experimental :cached;
22
+
23
+sub escape-filename($s is copy) is export is cached {
24
# return $s if $s ~~ m{^ <[a..z]>+ '://'}; # bail on external links
25
26
loop (my int $i = 0;$i < length;$i++) {
@@ -28,7 +30,7 @@ sub escape-filename($s is copy) is export {
28
30
$s
29
31
}
32
-sub rewrite-url($s) is export {
33
+sub rewrite-url($s) is export is cached {
34
my Str $r;
35
given $s {
36
when / ^ [ 'http' | 'https' | 'irc' ] '://' / {
0 commit comments