aboutsummaryrefslogtreecommitdiff
path: root/lib/docx/document-xml-reader.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-04-22 12:03:30 +0100
committerMichael Williamson <mike@zwobble.org>2014-04-22 12:03:30 +0100
commit796bce72195a448fc752668a7e16555acf0d7700 (patch)
treef902981dd4c240eb898cefc9c059a17f7f073401 /lib/docx/document-xml-reader.js
parent0326c56e24f7333381c7ef8c17aba0ac8380c02b (diff)
Add styleName property to Run
Diffstat (limited to 'lib/docx/document-xml-reader.js')
-rw-r--r--lib/docx/document-xml-reader.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/docx/document-xml-reader.js b/lib/docx/document-xml-reader.js
index da95a36..462cd61 100644
--- a/lib/docx/document-xml-reader.js
+++ b/lib/docx/document-xml-reader.js
@@ -108,7 +108,12 @@ function DocumentXmlReader(options) {
var styleElement = element.first("w:rStyle");
if (styleElement) {
- properties.styleId = styleElement.attributes["w:val"];
+ var styleId = styleElement.attributes["w:val"];
+ properties.styleId = styleId;
+ if (styleId) {
+ var style = styles.findCharacterStyleById(styleId);
+ properties.styleName = style.name;
+ }
}
properties.isBold = !!element.first("w:b");
properties.isItalic = !!element.first("w:i");