summaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-29 02:14:55 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-29 02:14:55 +0000
commit0a95ac2144de8552eeebabd6467bf25969352240 (patch)
treeec0649770fcab8c13d33d534af91db29840f4de0 /IkiWiki/Render.pm
parentf6b33b87721b54f7947be87296fc583564331f9e (diff)
Improved handling of wikilinks containing characters that are not allowed
in filenames. Now converts to valid filenames automatically. Note, need to --refresh your wiki after updating to this version, if you use any pages with __nn__ in their names.
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r--IkiWiki/Render.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 504edc843..f897b9b13 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -9,8 +9,8 @@ sub linkify ($$) { #{{{
my $page=shift;
$content =~ s{(\\?)$config{wiki_link_regexp}}{
- $2 ? ( $1 ? "[[$2|$3]]" : htmllink($page, $3, 0, 0, pagetitle($2)))
- : ( $1 ? "[[$3]]" : htmllink($page, $3))
+ $2 ? ( $1 ? "[[$2|$3]]" : htmllink($page, titlepage($3), 0, 0, pagetitle($2)))
+ : ( $1 ? "[[$3]]" : htmllink($page, titlepage($3)))
}eg;
return $content;
@@ -325,7 +325,7 @@ sub findlinks ($$) { #{{{
my @links;
while ($content =~ /(?<!\\)$config{wiki_link_regexp}/g) {
- push @links, lc($2);
+ push @links, titlepage($2);
}
# Discussion links are a special case since they're not in the text
# of the page, but on its template.