diff --git a/redfam.py b/redfam.py index a78b150..41e6367 100644 --- a/redfam.py +++ b/redfam.py @@ -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() ]