aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-04-22 11:42:08 +0100
committerMichael Williamson <mike@zwobble.org>2014-04-22 11:42:08 +0100
commitc33d575f33591f0b7b2e838b5dc21b6b0cc3a457 (patch)
treee311ecea51e776424004a319fafc91635b4bb325 /lib
parentbaafeb9304ad9505d76d57962711060035e40558 (diff)
Read names from styles.xml
Diffstat (limited to 'lib')
-rw-r--r--lib/docx/styles-reader.js3
1 files changed, 2 insertions, 1 deletions
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};
}