From c33d575f33591f0b7b2e838b5dc21b6b0cc3a457 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 22 Apr 2014 11:42:08 +0100 Subject: Read names from styles.xml --- lib/docx/styles-reader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/docx/styles-reader.js b/lib/docx/styles-reader.js index fd3425c..5cfabbf 100644 --- a/lib/docx/styles-reader.js +++ b/lib/docx/styles-reader.js @@ -27,5 +27,6 @@ function readStylesXml(xml) { function readStyleElement(styleElement) { var type = styleElement.attributes["w:type"]; var styleId = styleElement.attributes["w:styleId"]; - return {type: type, styleId: styleId}; + var name = styleElement.first("w:name").attributes["w:val"]; + return {type: type, styleId: styleId, name: name}; } -- cgit v1.2.3