Index: trunk/phase3/tests/parser/parserTests.txt |
— | — | @@ -1761,7 +1761,61 @@ |
1762 | 1762 | </p> |
1763 | 1763 | !!end |
1764 | 1764 | |
| 1765 | +!! test |
| 1766 | +Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue) |
| 1767 | +!! options |
| 1768 | +language=ca |
| 1769 | +!! input |
| 1770 | +'''[[Main Page]]''' |
| 1771 | +!! result |
| 1772 | +<p><b><a href="https://www.mediawiki.org/wiki/Main_Page">Main Page</a></b> |
| 1773 | +</p> |
| 1774 | +!! end |
1765 | 1775 | |
| 1776 | +!! test |
| 1777 | +Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue) |
| 1778 | +!! options |
| 1779 | +language=ca |
| 1780 | +!! input |
| 1781 | +''[[Main Page]]'' |
| 1782 | +!! result |
| 1783 | +<p><i><a href="https://www.mediawiki.org/wiki/Main_Page">Main Page</a></i> |
| 1784 | +</p> |
| 1785 | +!! end |
| 1786 | + |
| 1787 | +!! test |
| 1788 | +Internal link with en linktrail: no apostrophes (bug 27473) |
| 1789 | +!! options |
| 1790 | +language=en |
| 1791 | +!! input |
| 1792 | +[[Something]]'nice |
| 1793 | +!! result |
| 1794 | +<p><a href="https://www.mediawiki.org/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice |
| 1795 | +</p> |
| 1796 | +!! end |
| 1797 | + |
| 1798 | +!! test |
| 1799 | +Internal link with ca linktrail with apostrophes (bug 27473) |
| 1800 | +!! options |
| 1801 | +language=ca |
| 1802 | +!! input |
| 1803 | +[[Something]]'nice |
| 1804 | +!! result |
| 1805 | +<p><a href="https://www.mediawiki.org/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a> |
| 1806 | +</p> |
| 1807 | +!! end |
| 1808 | + |
| 1809 | +!! test |
| 1810 | +Internal link with kaa linktrail with apostrophes (bug 27473) |
| 1811 | +!! options |
| 1812 | +language=kaa |
| 1813 | +!! input |
| 1814 | +[[Something]]'nice |
| 1815 | +!! result |
| 1816 | +<p><a href="https://www.mediawiki.org/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a> |
| 1817 | +</p> |
| 1818 | +!! end |
| 1819 | + |
1766 | 1820 | ### |
1767 | 1821 | ### Interwiki links (see maintenance/interwiki.sql) |
1768 | 1822 | ### |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1459,11 +1459,8 @@ |
1460 | 1460 | * as a two-element array |
1461 | 1461 | */ |
1462 | 1462 | static function splitTrail( $trail ) { |
1463 | | - static $regex = false; |
1464 | | - if ( $regex === false ) { |
1465 | | - global $wgContLang; |
1466 | | - $regex = $wgContLang->linkTrail(); |
1467 | | - } |
| 1463 | + global $wgContLang; |
| 1464 | + $regex = $wgContLang->linkTrail(); |
1468 | 1465 | $inside = ''; |
1469 | 1466 | if ( $trail !== '' ) { |
1470 | 1467 | $m = array(); |
Index: trunk/phase3/languages/messages/MessagesCa.php |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | 'DeletedContributions' => array( 'Contribucions esborrades' ), |
181 | 181 | ); |
182 | 182 | |
183 | | -$linkTrail = '/^([a-zàèéíòóúç·ïü\']+)(.*)$/sDu'; |
| 183 | +$linkTrail = "/^((?:[a-zàèéíòóúç·ïü]|'(?!'))+)(.*)$/sDu"; |
184 | 184 | |
185 | 185 | $messages = array( |
186 | 186 | # User preference toggles |
Index: trunk/phase3/languages/messages/MessagesKaa.php |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | 'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns', |
150 | 150 | ); |
151 | 151 | |
152 | | -$linkTrail = "/^([a-zı'ʼ’“»]+)(.*)$/sDu"; |
| 152 | +$linkTrail = "/^((?:[a-zıʼ’“»]|'(?!'))+)(.*)$/sDu"; |
153 | 153 | |
154 | 154 | $messages = array( |
155 | 155 | # User preference toggles |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -231,6 +231,7 @@ |
232 | 232 | * (bug 28430) Make html and TeX output of <math> always be left-to-right. |
233 | 233 | * (bug 28306) Fix exposure of suppressed usernames in ForeignDBRepo |
234 | 234 | * (bug 28372) Fix bogus link to suppressed file versions in ForeignDBRepo |
| 235 | +* (bug 27473) Fix regression: bold, italic no longer interfere with linktrail for ca, kaa |
235 | 236 | |
236 | 237 | === API changes in 1.18 === |
237 | 238 | * (bug 26339) Throw warning when truncating an overlarge API result |