Skip to content

Commit

Permalink
Make text() recursion semantically saner: recurse over structure (and…
Browse files Browse the repository at this point in the history
… correction) only
  • Loading branch information
proycon committed Apr 11, 2017
1 parent bf9c27a commit decb66a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pynlpl/formats/folia.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def text(self, cls='current', retaintokenisation=False, previousdelimiter="",str
delimiter = ""
s = ""
for e in self:
if e.PRINTABLE and not isinstance(e, TextContent) and not isinstance(e, String):
if isinstance(e, AbstractStructureElement) or isinstance(e, Correction): #was: e.PRINTABLE and not isinstance(e, TextContent) and not isinstance(e, String):
try:
s += e.text(cls,retaintokenisation, delimiter,False,correctionhandling)

Expand Down

0 comments on commit decb66a

Please sign in to comment.