diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-13 18:45:38 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-13 18:45:38 +0000 |
commit | ac69a979059198a3716d1e177d177e978e1f1785 (patch) | |
tree | 37ccf024a84ca1ce8a8d2ad0476799e682240202 /ikiwiki | |
parent | 4796acdae76a294199e8d8152c3c9ed53db808a2 (diff) |
avoid linkifying escaped wikilinks
Diffstat (limited to 'ikiwiki')
-rwxr-xr-x | ikiwiki | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; } #}}} |