aboutsummaryrefslogtreecommitdiff
path: root/lib/docx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/docx')
-rw-r--r--lib/docx/body-reader.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js
index e21b422..5958efe 100644
--- a/lib/docx/body-reader.js
+++ b/lib/docx/body-reader.js
@@ -47,6 +47,15 @@ function BodyReader(options) {
return emptyResult();
}
+ function readParagraphIndent(element) {
+ return {
+ start: element.attributes["w:start"] || element.attributes["w:left"],
+ end: element.attributes["w:end"] || element.attributes["w:right"],
+ firstLine: element.attributes["w:firstLine"],
+ hanging: element.attributes["w:hanging"]
+ };
+ }
+
function readRunProperties(element) {
return readRunStyle(element).map(function(style) {
return {
@@ -182,7 +191,8 @@ function BodyReader(options) {
styleId: style.styleId,
styleName: style.name,
alignment: element.firstOrEmpty("w:jc").attributes["w:val"],
- numbering: readNumberingProperties(element.firstOrEmpty("w:numPr"), numbering)
+ numbering: readNumberingProperties(element.firstOrEmpty("w:numPr"), numbering),
+ indent: readParagraphIndent(element.firstOrEmpty("w:ind"))
};
});
},