From fcbd1134c66edb5c1eb80886b6f5841d3cfed061 Mon Sep 17 00:00:00 2001
From: Brion Vibber
Date: Wed, 6 Apr 2011 21:11:49 +0000
Subject: [PATCH] * (bug 27473) Fix regression: bold, italic no longer
interfere with linktrail for ca, kaa
Patch to ca, kaa linktrails to exclude multiple apostrophes by Platonides: https://bugzilla.wikimedia.org/attachment.cgi?id=8337
Added parser test cases to confirm that the linktrail apostrophe works on those languages, and to confirm that the bug where a link is surrounded by bold or italics is resolved.
Tweaked Linker::splitTrail() to keep it from permanently caching $wgContLang's linktrail; when we change content languages during a script run as we do with parser tests, that was leaving us stuck forever on English's linktrail.
This may slightly slow down that path, since it'll have to make a couple brief function calls into the Language object and its data cache.
---
RELEASE-NOTES | 1 +
includes/Linker.php | 7 ++--
languages/messages/MessagesCa.php | 2 +-
languages/messages/MessagesKaa.php | 2 +-
tests/parser/parserTests.txt | 54 ++++++++++++++++++++++++++++++
5 files changed, 59 insertions(+), 7 deletions(-)
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index bdb16cf99c..e3e2072584 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -231,6 +231,7 @@ PHP if you have not done so prior to upgrading MediaWiki.
* (bug 28430) Make html and TeX output of
!!end
+!! test
+Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
+!! options
+language=ca
+!! input
+'''[[Main Page]]'''
+!! result
+Main Page
+
+!! end
+
+!! test
+Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
+!! options
+language=ca
+!! input
+''[[Main Page]]''
+!! result
+Main Page
+
+!! end
+
+!! test
+Internal link with en linktrail: no apostrophes (bug 27473)
+!! options
+language=en
+!! input
+[[Something]]'nice
+!! result
+Something'nice
+
+!! end
+
+!! test
+Internal link with ca linktrail with apostrophes (bug 27473)
+!! options
+language=ca
+!! input
+[[Something]]'nice
+!! result
+Something'nice
+
+!! end
+
+!! test
+Internal link with kaa linktrail with apostrophes (bug 27473)
+!! options
+language=kaa
+!! input
+[[Something]]'nice
+!! result
+Something'nice
+
+!! end
###
### Interwiki links (see maintenance/interwiki.sql)
--
2.20.1