r19802 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19801‎ | r19802 | r19803 >
Date:07:45, 6 February 2007
Author:brion
Status:old
Tags:
Comment:
* (bug 8897) Fix whitespace removal for interlanguage links with link prefix
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -1566,6 +1566,53 @@
15671567 </p>
15681568 !! end
15691569
 1570+!! test
 1571+Interlanguage link
 1572+!! input
 1573+Blah blah blah
 1574+[[zh:Chinese]]
 1575+!!result
 1576+<p>Blah blah blah
 1577+</p>
 1578+!! end
 1579+
 1580+!! test
 1581+Double interlanguage link
 1582+!! input
 1583+Blah blah blah
 1584+[[es:Spanish]]
 1585+[[zh:Chinese]]
 1586+!!result
 1587+<p>Blah blah blah
 1588+</p>
 1589+!! end
 1590+
 1591+!! test
 1592+Interlanguage link, with prefix links
 1593+!! options
 1594+language=ln
 1595+!! input
 1596+Blah blah blah
 1597+[[zh:Chinese]]
 1598+!!result
 1599+<p>Blah blah blah
 1600+</p>
 1601+!! end
 1602+
 1603+!! test
 1604+Double interlanguage link, with prefix links (bug 8897)
 1605+!! options
 1606+language=ln
 1607+!! input
 1608+Blah blah blah
 1609+[[es:Spanish]]
 1610+[[zh:Chinese]]
 1611+!!result
 1612+<p>Blah blah blah
 1613+</p>
 1614+!! end
 1615+
 1616+
15701617 ##
15711618 ## XHTML tidiness
15721619 ###
Index: trunk/phase3/includes/Parser.php
@@ -1721,8 +1721,8 @@
17221722 wfProfileIn( "$fname-interwiki" );
17231723 if( $iw && $this->mOptions->getInterwikiMagic() && $nottalk && $wgContLang->getLanguageName( $iw ) ) {
17241724 $this->mOutput->addLanguageLink( $nt->getFullText() );
1725 - $s = rtrim($s . "\n");
1726 - $s .= trim($prefix . $trail, "\n") == '' ? '': $prefix . $trail;
 1725+ $s = rtrim($s . $prefix);
 1726+ $s .= trim($trail, "\n") == '' ? '': $prefix . $trail;
17271727 wfProfileOut( "$fname-interwiki" );
17281728 continue;
17291729 }
Index: trunk/phase3/RELEASE-NOTES
@@ -178,6 +178,7 @@
179179 * Clean up session checks to better handle the case where the session was
180180 opened during the current request. May help with some caching corner
181181 cases.
 182+* (bug 8897) Fix whitespace removal for interlanguage links with link prefix
182183
183184
184185 == Languages updated ==