From 488147a70728363a00ddc7b78048433c863cc8d7 Mon Sep 17 00:00:00 2001 From: "Jason T. Kiley" Date: Fri, 8 Aug 2014 11:18:46 -0400 Subject: [PATCH] Excludes `Image` objects when assembling content to write. --- pyth/plugins/plaintext/writer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyth/plugins/plaintext/writer.py b/pyth/plugins/plaintext/writer.py index 9dd8bfd..b440a94 100644 --- a/pyth/plugins/plaintext/writer.py +++ b/pyth/plugins/plaintext/writer.py @@ -46,9 +46,10 @@ def go(self): def paragraph(self, paragraph, prefix=""): content = [] for text in paragraph.content: - content.append(u"".join(text.content)) + if isinstance(text, document.Image) is False: + content.append(u"".join(text.content)) content = u"".join(content).encode("utf-8") - + for line in content.split("\n"): self.target.write(" " * self.indent) self.target.write(prefix)