Skip to content

Commit 264a20a

Browse files
committed
Adds .html to URLs that include .
This closes #2109 but in fact fixes all other .(.+) URLs that didn't work either. In fact this issue was known for some time, but was afraid to get into it because #1823. Anyway, this is a patch and there might be a better way of doing it, but that's how it's been addressed so far. Please test it extensively, might break something else somewhere...
1 parent 89bf0ab commit 264a20a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Pod/Htmlify.pm6

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ sub rewrite-url($s) is export {
7878
if !$r.contains('#') && ( $r.ends-with(<.>) || $r.match: / '%' <:AHex> ** 2 $ / ) {
7979
$r ~= '.html';
8080
}
81+
# If it's got some dot, add .html too.
82+
if !$r.contains('#') && !$r.ends-with('.html') && ( $r.match: / '/.' / ) {
83+
say $r;
84+
$r ~= '.html';
85+
}
8186
return %cache{$s} = $r;
8287
}
8388

0 commit comments

Comments
 (0)