aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-28 01:01:33 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-28 01:01:33 +0000
commit5a128f3d6333b16200512b33b5265b1b1e8f3837 (patch)
tree8a7c800acc6ba6dae810794b23506f0a936b4c07 /IkiWiki
parente220fbf35d727dca7ed835f797be89381afc873c (diff)
downloadikiwiki-5a128f3d6333b16200512b33b5265b1b1e8f3837.tar
ikiwiki-5a128f3d6333b16200512b33b5265b1b1e8f3837.tar.gz
* Replace underscores in shortcut texts with spaces when formatting for
display. This allows using a shortcut like [[wikipedia War_of_1812]], which links to the correct remote page, but is displayed nicely.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/shortcut.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/shortcut.pm b/IkiWiki/Plugin/shortcut.pm
index 2a4a36a41..26385f3a6 100644
--- a/IkiWiki/Plugin/shortcut.pm
+++ b/IkiWiki/Plugin/shortcut.pm
@@ -54,6 +54,7 @@ sub shortcut_expand ($$@) { #{{{
my $encoded_text=$text;
$encoded_text=~s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ $text=~s/_/ /g;
if (defined $desc) {
$desc=~s/\%s/$text/g;
}