summaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-06 21:20:14 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-06 21:20:14 +0000
commit4de163b997a6318f8bcec5f4608def9bb7ede4b4 (patch)
treef36360bff920348f540dc1866de5951e665132b1 /IkiWiki.pm
parentb49f8c13eeb7a68aa27e187841677481032cdb60 (diff)
* Fix display of escaped wikilinks containing anchors.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 8f9bd990a..37ff792d1 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -549,8 +549,14 @@ sub linkify ($$$) { #{{{
$content =~ s{(\\?)$config{wiki_link_regexp}}{
defined $2
- ? ( $1 ? "[[$2|$3]]" : htmllink($lpage, $page, linkpage($3), anchor => $4, linktext => pagetitle($2)))
- : ( $1 ? "[[$3]]" : htmllink($lpage, $page, linkpage($3), anchor => $4))
+ ? ( $1
+ ? "[[$2|$3".(length $4 ? "#$4" : "")."]]"
+ : htmllink($lpage, $page, linkpage($3),
+ anchor => $4, linktext => pagetitle($2)))
+ : ( $1
+ ? "[[$3".(length $4 ? "#$4" : "")."]]"
+ : htmllink($lpage, $page, linkpage($3),
+ anchor => $4))
}eg;
return $content;