Explorar el Código

Now passes wikilinks:blank_with_multiple_texts

pull/301/head
Fred Brennan hace 1 año
padre
commit
bd36dd2b6d
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      src/mwparserfromhell/nodes/wikilink.py

+ 2
- 2
src/mwparserfromhell/nodes/wikilink.py Ver fichero

@@ -36,7 +36,7 @@ class Wikilink(Node):
if not '|' in args:
self.text = args
else:
self.text = parse_anything(args).nodes[len(self.args)-1:]
self.text = parse_anything(args).nodes[len(list(a for a in self.args if len(a)))-1:]
else:
self.text = None

@@ -88,7 +88,7 @@ class Wikilink(Node):
if arg := parse_anything(value):
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)):]
self._text = str(arg)[len('|'.join(str(a) for a in self._args))-1:]
self._args.pop()
if len(self._text) == 0:
self._text = None


Cargando…
Cancelar
Guardar