Skip to content

Commit

Permalink
Fix for old Py3k versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlcctrlv committed Jan 30, 2023
1 parent bd36dd2 commit 55a0971
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mwparserfromhell/nodes/wikilink.py
Expand Up @@ -85,7 +85,8 @@ def text(self):

@args.setter
def args(self, value):
if arg := parse_anything(value):
arg = parse_anything(value)
if arg:
self._args = [node for node in str(arg.nodes[0]).split('|')]
if len(self._args) > 0:
self._text = str(arg)[len('|'.join(str(a) for a in self._args))-1:]
Expand Down

0 comments on commit 55a0971

Please sign in to comment.