diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-01-19 19:52:21 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-01-19 19:52:21 +0000 |
| commit | 83feedc21e7ba06625837d3c11461d9e8734bf6c (patch) | |
| tree | 60754063b1bdaed303b2eedb9896dffe89897a83 /lib/docx/footnotes-reader.js | |
| parent | 5a0b91e72fc89695fcb92ed5306587a64570ddd0 (diff) | |
Modify footnotes-reader to allow reading of other notes
Diffstat (limited to 'lib/docx/footnotes-reader.js')
| -rw-r--r-- | lib/docx/footnotes-reader.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/docx/footnotes-reader.js b/lib/docx/footnotes-reader.js deleted file mode 100644 index aea623a..0000000 --- a/lib/docx/footnotes-reader.js +++ /dev/null @@ -1,18 +0,0 @@ -exports.readFootnotesXml = readFootnotesXml; - -function readFootnotesXml(xml) { - return xml.root.getElementsByTagName("w:footnote") - .filter(isFootnoteElement) - .map(readFootnoteElement); -} - -function isFootnoteElement(element) { - var type = element.attributes["w:type"]; - return type !== "continuationSeparator" && type !== "separator"; -} - -function readFootnoteElement(footnoteElement) { - var id = footnoteElement.attributes["w:id"]; - var body = footnoteElement.children; - return {id: id, body: body}; -} |
