jayvdb added a comment.
But if `[[گوسفند]]ها` is being converted to [[گوسفند|گوسفندها]], as Dalba
suggests above, then something is wrong, as that is not what cleanUpLinks (and
the new replace links tools) are supposed do (and in my experience they do not
do this in LTR text).
Anyway, rather than theorize, lets find what the actual problem is.
Unfortunately, I cant reproduce that behaviour.
$ python2.7 pwb.py shell
Welcome to the Pywikibot interactive shell!
>>> import pywikibot
>>> s = pywikibot.Site('fa', 'wikipedia')
>>> p = pywikibot.Page(s, 'User:John_Vandenberg/test') # م[[ختلف]]ی
>>> from pywikibot.cosmetic_changes import CosmeticChangesToolkit
>>> cc = CosmeticChangesToolkit.from_page(p, False, False)
>>> cc.cleanUpLinks(p.text)
u'\u0645[[\u062e\u062a\u0644\u0641]]\u06cc'
>>> cc.cleanUpLinks(u'[[گوسفند]]ها')
u'[[\u06af\u0648\u0633\u0641\u0646\u062f]]\u0647\u0627'
Would be good if a current reproducible example can be shown of `cleanUpLinks`
splitting the link inappropriately.
TASK DETAIL
https://phabricator.wikimedia.org/T118076
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Ladsgroup, jayvdb
Cc: XZise, Dalba, Aklapper, Yamaha5, jayvdb, pywikibot-bugs-list
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs