diff --git a/redfam.py b/redfam.py index 0a23315..3bc68a0 100644 --- a/redfam.py +++ b/redfam.py @@ -205,7 +205,7 @@ class RedFamParser( RedFam ): """ # Predefine a pattern for wikilinks' destination - wikilink_pat = re.compile( r"\[\[([^\[\]\|]*)(\]\]|\|)" ) + wikilink_pat = re.compile( r"\[\[([^\[\]\|]+)(?:\]\]|\|)" ) # Parse content of heading for generating section links later match = type( self ).__sectionhead_pat.search( heading )