jenkins-bot has submitted this change and it was merged.
Change subject: Do not change pipe links with r# choice
......................................................................
Do not change pipe links with r# choice
When there is a pipe link, r# as well as # choice options
shouldn't change it. # should always create a pipe link if there
isn't one (which is the given behaviour). But #r should not replace
an already given pipe link with the new target link only but keep
the link text.
Change-Id: I54cc7beec8d9a2037b28d4763dd57a44823fa457
---
M scripts/solve_disambiguation.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
Xqt: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index f25f617..0248094 100644
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -776,7 +776,7 @@
else:
if len(choice) > 0 and choice[0] == 'r':
# we want to throw away the original link text
- replaceit = True
+ replaceit = link_text == page_title
choice = choice[1:]
elif include == "redirect":
replaceit = True
--
To view, visit
https://gerrit.wikimedia.org/r/176477
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I54cc7beec8d9a2037b28d4763dd57a44823fa457
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: Russell Blau <russblau(a)imapmail.org>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>