From 081c141fa57175d7adb8be5de908084bee151c00 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 8 Jul 2014 11:03:48 +0100 Subject: Rename function to make visibility clearer --- mammoth/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mammoth') diff --git a/mammoth/__init__.py b/mammoth/__init__.py index 0b524b1..4a3643c 100644 --- a/mammoth/__init__.py +++ b/mammoth/__init__.py @@ -16,14 +16,14 @@ def convert_to_html(fileobj, transform_document=None, **kwargs): def extract_raw_text(fileobj): - return docx.read(fileobj).map(extract_raw_text_from_element) + return docx.read(fileobj).map(_extract_raw_text_from_element) -def extract_raw_text_from_element(element): +def _extract_raw_text_from_element(element): if isinstance(element, documents.Text): return element.value else: - text = "".join(map(extract_raw_text_from_element, element.children)) + text = "".join(map(_extract_raw_text_from_element, element.children)) if isinstance(element, documents.Paragraph): return text + "\n\n" else: -- cgit v1.2.3