diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-06-10 15:46:32 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-06-10 15:46:32 +0100 |
| commit | ee2fc5da880df5f9ea8cdaebc506d130c3009ce3 (patch) | |
| tree | a8e42446189b8504e09b2b02f51d31d970668e2f /lib/docx/document-xml-reader.js | |
| parent | 296ac78496e4d94dafd1a4f6f872a1283b796318 (diff) | |
Read footnote references
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, |
