From: joey Date: Fri, 6 Apr 2007 21:20:14 +0000 (+0000) Subject: * Fix display of escaped wikilinks containing anchors. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/4de163b997a6318f8bcec5f4608def9bb7ede4b4 * Fix display of escaped wikilinks containing anchors. --- 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; diff --git a/debian/changelog b/debian/changelog index a26394cd5..ac6af1075 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,8 +43,9 @@ ikiwiki (1.49) UNRELEASED; urgency=low flashing during page load. * Fix smiley plugin to scan smileys.mdwn after it's updated, which fixes a bug caused by committing changes to smilies.mdwn. + * Fix display of escaped wikilinks containing anchors. - -- Joey Hess Fri, 06 Apr 2007 16:32:09 -0400 + -- Joey Hess Fri, 06 Apr 2007 17:17:52 -0400 ikiwiki (1.48) unstable; urgency=low diff --git a/doc/wikilink/discussion.mdwn b/doc/wikilink/discussion.mdwn index 0bf33ade9..3b6f042d3 100644 --- a/doc/wikilink/discussion.mdwn +++ b/doc/wikilink/discussion.mdwn @@ -18,3 +18,5 @@ BTW, ikiwiki doesn't displays the #foo anchor in the example > > The lack of the `#foo` anchor in the anchor example on [[wikilink]] > definitely looks like a bug. --[[JoshTriplett]] + +>> Fixed that --[[Joey]] diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index e12b52494..29db5e4d3 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-06 16:36-0400\n" +"POT-Creation-Date: 2007-04-06 17:19-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -545,7 +545,7 @@ msgstr "" #. translators: preprocessor directive name, #. translators: the second a page name, the #. translators: third a number. -#: ../IkiWiki.pm:614 +#: ../IkiWiki.pm:620 #, perl-format msgid "%s preprocessing loop detected on %s at depth %i" msgstr ""