From 0eeab964d0373ecdbdd14b5c96b0ab6faaa18cad Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 23 Jan 2018 22:06:12 +0000 Subject: Generate relationships path from part path --- mammoth/docx/notes_xml.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mammoth/docx/notes_xml.py') diff --git a/mammoth/docx/notes_xml.py b/mammoth/docx/notes_xml.py index f1072f9..5e4ea4e 100644 --- a/mammoth/docx/notes_xml.py +++ b/mammoth/docx/notes_xml.py @@ -5,7 +5,7 @@ from .. import documents from .. import results -def create_reader(note_type, body_reader): +def _read_notes(note_type, element, body_reader): def read_notes_xml_element(element): note_elements = lists.filter( _is_note_element, @@ -26,7 +26,7 @@ def create_reader(note_type, body_reader): body=body )) - return read_notes_xml_element + return read_notes_xml_element(element) -create_footnotes_reader = functools.partial(create_reader, "footnote") -create_endnotes_reader = functools.partial(create_reader, "endnote") +read_footnotes_xml_element = functools.partial(_read_notes, "footnote") +read_endnotes_xml_element = functools.partial(_read_notes, "endnote") -- cgit v1.2.3