(noteType, bodyReader)
| 1755 | exports.createEndnotesReader = createReader.bind(this, "endnote"); |
| 1756 | |
| 1757 | function createReader(noteType, bodyReader) { |
| 1758 | function readNotesXml(element) { |
| 1759 | return Result.combine(element.getElementsByTagName("w:" + noteType) |
| 1760 | .filter(isFootnoteElement) |
| 1761 | .map(readFootnoteElement)); |
| 1762 | } |
| 1763 | |
| 1764 | function isFootnoteElement(element) { |
| 1765 | var type = element.attributes["w:type"]; |
| 1766 | return type !== "continuationSeparator" && type !== "separator"; |
| 1767 | } |
| 1768 | |
| 1769 | function readFootnoteElement(footnoteElement) { |
| 1770 | var id = footnoteElement.attributes["w:id"]; |
| 1771 | return bodyReader.readXmlElements(footnoteElement.children) |
| 1772 | .map(function(body) { |
| 1773 | return documents.Note({noteType: noteType, noteId: id, body: body}); |
| 1774 | }); |
| 1775 | } |
| 1776 | |
| 1777 | return readNotesXml; |
| 1778 | } |
| 1779 | |
| 1780 | },{"../documents":4,"../results":24}],11:[function(require,module,exports){ |
| 1781 | exports.readNumberingXml = readNumberingXml; |
nothing calls this directly
no outgoing calls
no test coverage detected