Merge branch 'fs#77-errors-on-old-archives' into fs#70-refactoring

This commit is contained in:
2016-08-24 19:59:53 +02:00

View File

@@ -210,13 +210,14 @@ class RedFamParser( RedFam ):
@type heading wikicode or mwparser-parseable
"""
# Parse heading with mwparse if needed
if not isinstance( heading, mwparser.wikicode.Wikicode ):
heading = mwparser.parse( heading )
# Save heading as string
self._heading = str( heading )
# Parse string heading with mwparse again everytime
# In some cases the given wikicode is broken due to syntax errors
# (Task FS#77)
heading = mwparser.parse( self._heading )
# Save destinations of wikilinks in headings
self._articlesList = [ str( link.title ) for link
in heading.ifilter_wikilinks() ]