diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/docx/body-reader.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index bdc0954..2d74c13 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -118,20 +118,14 @@ function BodyReader(options) { .insertExtra(); }, "w:pPr": function(element) { - var properties = { - type: "paragraphProperties" - }; - - var alignElement = element.first("w:jc"); - if (alignElement) { - properties.alignment = alignElement.attributes["w:val"]; - } - properties.numbering = readNumberingProperties(element.firstOrEmpty("w:numPr")); - return readParagraphStyle(element).map(function(style) { - properties.styleId = style.styleId; - properties.styleName = style.name; - return properties; + return { + type: "paragraphProperties", + styleId: style.styleId, + styleName: style.name, + alignment: element.firstOrEmpty("w:jc").attributes["w:val"], + numbering: readNumberingProperties(element.firstOrEmpty("w:numPr")) + }; }); }, "w:r": function(element) { |
