From 64b823c26c385dcd57aff3e19ce19af0489199e0 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jul 2016 20:11:29 +0100 Subject: Read comment references --- lib/docx/body-reader.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/docx') diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index c338893..b514363 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -92,6 +92,12 @@ function BodyReader(options) { }; } + function readCommentReference(element) { + return elementResult(documents.commentReference({ + commentId: element.attributes["w:id"] + })); + } + function readChildElements(element) { return readXmlElements(element.children); } @@ -162,6 +168,7 @@ function BodyReader(options) { "w:tc": readTableCell, "w:footnoteReference": noteReferenceReader("footnote"), "w:endnoteReference": noteReferenceReader("endnote"), + "w:commentReference": readCommentReference, "w:br": function(element) { var breakType = element.attributes["w:type"]; if (breakType) { -- cgit v1.2.3