MCPcopy Create free account
hub / github.com/TruthHun/BookStack / createReader

Function createReader

static/word2md/mammoth.browser.js:1757–1778  ·  view source on GitHub ↗
(noteType, bodyReader)

Source from the content-addressed store, hash-verified

1755exports.createEndnotesReader = createReader.bind(this, "endnote");
1756
1757function 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){
1781exports.readNumberingXml = readNumberingXml;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected