aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-07-05 19:51:04 +0100
committerMichael Williamson <mike@zwobble.org>2014-07-05 19:51:04 +0100
commitdb6bae062b7bc2e9bcda02a62dea2f438bd00d73 (patch)
tree10abc2debf46c191fc022ec7349ecd63ec8bd945 /lib
parent12c1f40eee1d72b2ac1756a584440f7ae9241892 (diff)
Read tables from docx files
Diffstat (limited to 'lib')
-rw-r--r--lib/docx/document-xml-reader.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/docx/document-xml-reader.js b/lib/docx/document-xml-reader.js
index 2145e3c..b2736f8 100644
--- a/lib/docx/document-xml-reader.js
+++ b/lib/docx/document-xml-reader.js
@@ -153,6 +153,15 @@ function DocumentXmlReader(options) {
}
});
},
+ "w:table": function(element) {
+ return readXmlElements(element.children).map(documents.Table);
+ },
+ "w:tr": function(element) {
+ return readXmlElements(element.children).map(documents.TableRow);
+ },
+ "w:tc": function(element) {
+ return readXmlElements(element.children).map(documents.TableCell);
+ },
"w:footnoteReference": function(element) {
var footnoteId = element.attributes["w:id"];
return new Result(new documents.FootnoteReference({