From a7606861ba567e540ee3b82be512089e4c029f7c Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Tue, 30 Jul 2019 12:52:07 +0200 Subject: [PATCH] Fifth's the charm --- util/issue-with-all-pod6.p6 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/util/issue-with-all-pod6.p6 b/util/issue-with-all-pod6.p6 index 7ed5dba0c..429d6ff4f 100755 --- a/util/issue-with-all-pod6.p6 +++ b/util/issue-with-all-pod6.p6 @@ -8,12 +8,18 @@ for @docs -> $d { my $repo-path = S[doc] = '/perl6/doc/blob/master/doc' with $d; my $web-path = S[doc] = 'https://docs.perl6.org' with $d; my $doc-name = $d.split("/")[*-1].split(".")[0]; - if $web-path ~~ /Type/ { - my @fragments = $web-path.split("/Type/"); - $doc-name = @fragments[1].trans( ['/'] => ['::'] ).split(".")[0]; - $web-path = @fragments[0] ~ "/type/" ~ $doc-name; + given $web-path { + when /Type/ { + my @fragments = $web-path.split("/Type/"); + $doc-name = @fragments[1].trans( ['/'] => ['::'] ).split(".")[0]; + $web-path = @fragments[0] ~ "/type/" ~ $doc-name; + } + when "https://docs.perl6.org/HomePage.pod6" { + $web-path = "https://docs.perl6.org/" + } } - $web-path .= trans( [ "Language", "Programs" ] => - [ "language", "programs" ] ); + + $web-path .= trans( [ "Language", "Programs", ".pod6" ] => + [ "language", "programs", "" ] ); say "* [ ] $doc-name [file]($repo-path), [generated]($web-path)"; }