r9095 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9094‎ | r9095 | r9096 >
Date:09:21, 18 May 2005
Author:vibber
Status:old
Tags:
Comment:
Fix for the main (no pipe) case of bug 2095, triple closing backets on link
was putting the extra bracket as the link text instead of the trail.
This was due to a broken workaround for links in image captions.
For now it will still move the bracket inside the link text for piped links,
which is wrong and ought to be fixed.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -1214,7 +1214,11 @@
12151215 # [[Image:Foo.jpg|[http://example.com desc]]] <- having three ] in a row fucks up,
12161216 # the real problem is with the $e1 regex
12171217 # See bug 1300.
1218 - if (preg_match( "/^\](.*)/s", $m[3], $n ) ) {
 1218+ #
 1219+ # Still some problems for cases where the ] is meant to be outside punctuation,
 1220+ # and no image is in sight. See bug 2095.
 1221+ #
 1222+ if( $text !== '' && preg_match( "/^\](.*)/s", $m[3], $n ) ) {
12191223 $text .= ']'; # so that replaceExternalLinks($text) works later
12201224 $m[3] = $n[1];
12211225 }
Index: trunk/phase3/RELEASE-NOTES
@@ -194,6 +194,7 @@
195195 ogg, pdf, ps, rm, rpm, tar, tex, ttf and txt files based on the KDE
196196 crystalsvg theme.
197197 * Fixed a bug in Special:Newimages that made it impossible to search for '0'
 198+* (bug 2095) Triple-closing-bracket thing partly fixed
198199
199200
200201 === Caveats ===

Follow-up revisions

RevisionCommit summaryAuthorDate
r13301Fix bug 2095: three closing bracketsgabrielwicke16:40, 24 March 2006
r13307Collected updates:...gabrielwicke17:10, 24 March 2006

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r9091Add parser test for bug 2095; working on it...vibber08:43, 18 May 2005

Status & tagging log