summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki6
1 files changed, 4 insertions, 2 deletions
diff --git a/ikiwiki b/ikiwiki
index 4e64e4031..111ef54fc 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -172,7 +172,7 @@ sub findlinks ($) { #{{{
my $content=shift;
my @links;
- while ($content =~ /$config{wiki_link_regexp}/g) {
+ while ($content =~ /(?<!\\)$config{wiki_link_regexp}/g) {
push @links, lc($1);
}
return @links;
@@ -247,7 +247,9 @@ sub linkify ($$) { #{{{
my $content=shift;
my $file=shift;
- $content =~ s/$config{wiki_link_regexp}/htmllink(pagename($file), $1)/eg;
+ $content =~ s{(\\?)$config{wiki_link_regexp}}{
+ $1 ? "[[$2]]" : htmllink(pagename($file), $2)
+ }eg;
return $content;
} #}}}