From 67ea7c95deae6bbf97f115366b94736c34bc1f7f Mon Sep 17 00:00:00 2001 From: Jacob Wright Date: Fri, 15 Sep 2017 08:37:57 -0600 Subject: [PATCH] Just pagebreak, update test --- ts/docx/paragraph/index.ts | 2 +- ts/tests/docx/paragraph/paragraphTests.ts | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ts/docx/paragraph/index.ts b/ts/docx/paragraph/index.ts index 51815ec904..de48cd7115 100644 --- a/ts/docx/paragraph/index.ts +++ b/ts/docx/paragraph/index.ts @@ -98,7 +98,7 @@ export class Paragraph extends XmlComponent { } public thematicBreak(): Paragraph { - this.root.push(new ThematicBreak()); + this.properties.push(new ThematicBreak()); return this; } diff --git a/ts/tests/docx/paragraph/paragraphTests.ts b/ts/tests/docx/paragraph/paragraphTests.ts index 1209fecea1..1b103a5a8f 100644 --- a/ts/tests/docx/paragraph/paragraphTests.ts +++ b/ts/tests/docx/paragraph/paragraphTests.ts @@ -144,12 +144,10 @@ describe("Paragraph", () => { const tree = new Formatter().format(paragraph); expect(tree).to.deep.equal({ "w:p": [{ - "w:pPr": [{ - "w:r": [ - {"w:rPr": []}, - {"w:br": [{_attr: {"w:type": "page"}}]}, - ], - }], + "w:r": [ + {"w:rPr": []}, + {"w:br": [{_attr: {"w:type": "page"}}]}, + ], }], }); });