diff options
Diffstat (limited to 'lib/docx/document-xml-reader.js')
| -rw-r--r-- | lib/docx/document-xml-reader.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/docx/document-xml-reader.js b/lib/docx/document-xml-reader.js index 462cd61..348bccf 100644 --- a/lib/docx/document-xml-reader.js +++ b/lib/docx/document-xml-reader.js @@ -14,6 +14,7 @@ function DocumentXmlReader(options) { var docxFile = options.docxFile; var numbering = options.numbering; var styles = options.styles; + var footnotes = options.footnotes; function convertXmlToDocument(documentXml) { @@ -21,7 +22,7 @@ function DocumentXmlReader(options) { var result = readXmlElements(body.children) .map(function(children) { - return new documents.Document(children); + return new documents.Document(children, footnotes); }); result.document = result.value; return result; @@ -137,6 +138,12 @@ function DocumentXmlReader(options) { } }); }, + "w:footnoteReference": function(element) { + var footnoteId = element.attributes["w:id"]; + return new Result(new documents.FootnoteReference({ + footnoteId: footnoteId + })); + }, "w:ins": readChildElements, "w:smartTag": readChildElements, |
