diff options
Diffstat (limited to 'IkiWiki/Plugin/meta.pm')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 8555e1109..987262a48 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -108,13 +108,16 @@ sub preprocess (@) { #{{{ return "" if $page ne $destpage; my $safe=0; if ($value !~ /^\w+:\/\//) { - add_depends($page, $value); - my $link=bestlink($page, $value); + my ($redir_page, $redir_anchor) = split /\#/, $value; + + add_depends($page, $redir_page); + my $link=bestlink($page, $redir_page); if (! length $link) { return "[[meta ".gettext("redir page not found")."]]"; } $value=urlto($link, $page); + $value.='#'.$redir_anchor if defined $redir_anchor; $safe=1; # redir cycle detection |