]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Replace underscores in shortcut texts with spaces when formatting for
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 28 Jan 2007 01:01:33 +0000 (01:01 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 28 Jan 2007 01:01:33 +0000 (01:01 +0000)
  display. This allows using a shortcut like [[wikipedia War_of_1812]],
  which links to the correct remote page, but is displayed nicely.

IkiWiki/Plugin/shortcut.pm
debian/changelog
doc/bugs/shortcuts_don__39__t_escape_from_Markdown.mdwn
doc/plugins/shortcut.mdwn

index 2a4a36a41764e29d7f50bcb03f50af167f32538a..26385f3a6e83569ab0d89e8d1e968fc535d8776d 100644 (file)
@@ -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;
        }
index cd134a2c7607b2c286b15e83040a1405f5f54515..f7ae8d5bae350c73438c555d12e336d2da0760a5 100644 (file)
@@ -14,8 +14,11 @@ ikiwiki (1.41) UNRELEASED; urgency=low
   * Always call rcs_update after a commit during a web edit, to work around
     the problem described in bugs/svn_fails_to_update. Thanks to Ethan for the
     analysis and patch.
+  * 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.
 
- -- Joey Hess <joeyh@debian.org>  Sat, 27 Jan 2007 19:18:27 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 27 Jan 2007 19:59:58 -0500
 
 ikiwiki (1.40) unstable; urgency=low
 
index f5c4db66086d028d56ce55bf544a6600079b1479..f977dc354a543c4d80c06d0c19e360fde2ec0a50 100644 (file)
@@ -2,4 +2,6 @@ Writing [[wikipedia Low_frequency_oscillation]] causes the word "frequency"
 to show up in italics, since underscores are Markdown for italics. Using
 [[wikipedia low frequency oscillation]] works in this case, because Wikipedia
 will redirect, but it's hardly clean. Maybe the shortcuts plugin should
-run pagetitle() on the text of its link? --Ethan
\ No newline at end of file
+run pagetitle() on the text of its link? --Ethan
+
+> [[bugs/done]] --[[Joey]]
index 33180b120c92d1cfe447ea3b90e02d2a459bf152..83d8593a83c84c7d7b426a033db2ab1dd67851ae 100644 (file)
@@ -5,7 +5,7 @@ This plugin allows external links to commonly linked to sites to be made
 more easily using shortcuts. Some examples of using shortcuts include:
 
        \[[google foo]]
-       \[[wikipedia War of 1812]]
+       \[[wikipedia War_of_1812]]
        \[[debbug 12345]]
 
 The available shortcuts are defined on the [[shortcuts]] page in