summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/brokenlinks.pm3
-rw-r--r--IkiWiki/Plugin/orphans.pm3
2 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index e79ce1d81..a23436fd0 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
@@ -21,8 +21,9 @@ sub preprocess (@) { #{{{
my @broken;
foreach my $page (keys %links) {
if (pagespec_match($page, $params{pages})) {
+ my $discussion=gettext("discussion");
foreach my $link (@{$links{$page}}) {
- next if $link =~ /.*\/discussion/i && $config{discussion};
+ next if $link =~ /.*\/\Q$discussion\E/i && $config{discussion};
my $bestlink=bestlink($page, $link);
next if length $bestlink;
push @broken,
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm
index 6ba37615e..def8e92d6 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
@@ -25,6 +25,7 @@ sub preprocess (@) { #{{{
}
my @orphans;
+ my $discussion=gettext("discussion");
foreach my $page (keys %renderedfiles) {
next if $linkedto{$page};
next unless pagespec_match($page, $params{pages});
@@ -32,7 +33,7 @@ sub preprocess (@) { #{{{
# indirectly linked to a page via that page's backlinks.
next if grep {
length $_ &&
- ($_ !~ /\/Discussion$/i || ! $config{discussion}) &&
+ ($_ !~ /\/\Q$discussion\E$/i || ! $config{discussion}) &&
bestlink($page, $_) !~ /^($page|)$/
} @{$links{$page}};
push @orphans, $page;