summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-13 18:45:38 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-13 18:45:38 +0000
commitac69a979059198a3716d1e177d177e978e1f1785 (patch)
tree37ccf024a84ca1ce8a8d2ad0476799e682240202 /ikiwiki
parent4796acdae76a294199e8d8152c3c9ed53db808a2 (diff)
avoid linkifying escaped wikilinks
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;
} #}}}