From c1a3e929b7268f14619daf3eff0085a747703f7e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 8 Apr 2013 20:34:34 +0100 Subject: Remove properties attribute from Run --- lib/documents.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/documents.js') diff --git a/lib/documents.js b/lib/documents.js index e4f0ef7..f1ce08b 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -5,8 +5,6 @@ function Document(children) { }; } -Run = ElementWithChildren("run"); - function Paragraph(children, properties) { properties = properties || {}; return { @@ -16,6 +14,17 @@ function Paragraph(children, properties) { }; } +function Run(children, properties) { + properties = properties || {}; + return { + type: "run", + children: children, + styleName: properties.styleName, + isBold: properties.isBold, + isItalic: properties.isItalic + }; +} + function Text(value) { return { type: "text", -- cgit v1.2.3