aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-04-08 20:30:34 +0100
committerMichael Williamson <mike@zwobble.org>2013-04-08 20:30:34 +0100
commit5eb933d6c001caf7e9cba0339165f59819f79728 (patch)
treedf8ff3eb08c0aa53aada437d1b1b723983cc5404 /lib
parent6d764fc3241996b3da3b2d4a2c50974bdf1ea058 (diff)
Store styleName directly on paragraph
Diffstat (limited to 'lib')
-rw-r--r--lib/documents.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/documents.js b/lib/documents.js
index d1c1e03..af416da 100644
--- a/lib/documents.js
+++ b/lib/documents.js
@@ -5,9 +5,18 @@ function Document(children) {
};
}
-Paragraph = ElementWithChildren("paragraph");
Run = ElementWithChildren("run");
+function Paragraph(children, properties) {
+ properties = properties || {};
+ return {
+ type: "paragraph",
+ children: children,
+ styleName: properties.styleName,
+ properties: properties
+ };
+}
+
function Text(value) {
return {
type: "text",