http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11732
Revision: 11732 Author: xqt Date: 2013-07-09 12:10:36 +0000 (Tue, 09 Jul 2013) Log Message: ----------- No checks are made by langlinkUnsafe() constructor. Anyway we need to extract the section.
Modified Paths: -------------- branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2013-07-08 17:42:58 UTC (rev 11731) +++ branches/rewrite/pywikibot/page.py 2013-07-09 12:10:36 UTC (rev 11732) @@ -3206,8 +3206,12 @@ if ns: link._namespace = ns title = t + if u"#" in title: + t, sec = title.split(u'#', 1) + title, link._section = t.rstrip(), sec.lstrip() + else: + link._section = None link._title = title - return link
# Utility functions for parsing page titles
pywikipedia-svn@lists.wikimedia.org