X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e4eca63767a497ef696bb7757763f138114581e3..f7601954a862afd4c5a5b9ba83480af0472e1cf9:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 974e36902..97d84c9de 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1870,7 +1870,7 @@ sub pagespec_translate ($) { [^\s()]+ # any other text ) \s* # ignore whitespace - }igx) { + }gx) { my $word=$1; if (lc $word eq 'and') { $code.=' &&'; @@ -2052,10 +2052,10 @@ sub match_link ($$;@) { else { return IkiWiki::SuccessReason->new("$page links to page $p matching $link") if match_glob($p, $link, %params); - $p=~s/^\///; + my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p matching $link") - if match_glob($p, $link, %params); + return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link") + if match_glob($p_rel, $link, %params); } } return IkiWiki::FailReason->new("$page does not link to $link");