Explorar el Código

Properly read from file-like objects when passed to parse_anything() (#137)

tags/v0.4.4
Ben Kurtovic hace 8 años
padre
commit
af666bba16
Se han modificado 3 ficheros con 5 adiciones y 0 borrados
  1. +1
    -0
      CHANGELOG
  2. +2
    -0
      docs/changelog.rst
  3. +2
    -0
      mwparserfromhell/utils.py

+ 1
- 0
CHANGELOG Ver fichero

@@ -3,6 +3,7 @@ v0.5 (unreleased):
- Fixed parsing bugs involving:
- wikitables nested in templates;
- wikitable error recovery when unable to recurse.
- Fixed parsing file-like objects.

v0.4.3 (released October 29, 2015):



+ 2
- 0
docs/changelog.rst Ver fichero

@@ -12,6 +12,8 @@ Unreleased
- wikitables nested in templates;
- wikitable error recovery when unable to recurse.

- Fixed parsing file-like objects.

v0.4.3
------



+ 2
- 0
mwparserfromhell/utils.py Ver fichero

@@ -62,6 +62,8 @@ def parse_anything(value, context=0, skip_style_tags=False):
return Parser().parse(str(value), context, skip_style_tags)
elif value is None:
return Wikicode(SmartList())
elif hasattr(value, "read"):
return parse_anything(value.read(), context, skip_style_tags)
try:
nodelist = SmartList()
for item in value:


Cargando…
Cancelar
Guardar