Merge branch 'fs#77-errors-on-old-archives' into fs#70-refactoring
This commit is contained in:
@@ -210,13 +210,14 @@ class RedFamParser( RedFam ):
|
|||||||
@type heading wikicode or mwparser-parseable
|
@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
|
# Save heading as string
|
||||||
self._heading = str( heading )
|
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
|
# Save destinations of wikilinks in headings
|
||||||
self._articlesList = [ str( link.title ) for link
|
self._articlesList = [ str( link.title ) for link
|
||||||
in heading.ifilter_wikilinks() ]
|
in heading.ifilter_wikilinks() ]
|
||||||
|
|||||||
Reference in New Issue
Block a user