Skip to content

Commit 05fc6de

Browse files
committed
Merge github.com:perl6/doc
2 parents 26dfd06 + df4cae5 commit 05fc6de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

htmlify.pl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,10 @@ (Bool :$debug, Bool :$typegraph = False)
425425
say 'Writing html/js/search.js ...';
426426
my $template = slurp("template/search_template.js");
427427
my @items;
428-
my sub fix-url ($raw) { $raw.substr(1) ~ '.html' };
428+
my sub fix-url ($raw) {
429+
$raw ~~ /^.(.*?)('#'.*)?$/;
430+
$0 ~ '.html' ~ ($1||'')
431+
};
429432
@items.push: $dr.lookup('language', :by<kind>).sort(*.name).map({
430433
"\{ label: \"Language: {.name}\", value: \"{.name}\", url: \"{ fix-url(.url) }\" \}"
431434
});

0 commit comments

Comments
 (0)