http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9413
Revision: 9413 Author: xqt Date: 2011-07-17 12:29:50 +0000 (Sun, 17 Jul 2011) Log Message: ----------- do not add separator line in special cases (bugfix for bug #3281226)
Modified Paths: -------------- trunk/pywikipedia/pywikibot/textlib.py
Modified: trunk/pywikipedia/pywikibot/textlib.py =================================================================== --- trunk/pywikipedia/pywikibot/textlib.py 2011-07-17 10:56:14 UTC (rev 9412) +++ trunk/pywikipedia/pywikibot/textlib.py 2011-07-17 12:29:50 UTC (rev 9413) @@ -408,7 +408,11 @@ if s: if site.language() in site.family.interwiki_attop or \ u'<!-- interwiki at top -->' in oldtext: - newtext = s + separator + s2.replace(marker,'').strip() + #do not add separator if interiki links are on one line + newtext = s + \ + [separator, u''][site.language() in + site.family.interwiki_on_one_line] + \ + s2.replace(marker, '').strip() else: # calculate what was after the language links on the page firstafter = s2.find(marker)