From e04d9e0c97468ba4d8bb003475375493a4b7ed05 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 29 Mar 2016 23:36:57 +0100 Subject: [PATCH] renamed page break to thematic break --- ts/docx/paragraph.ts | 10 +++++++++- ts/tests/paragraphTest.ts | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ts/docx/paragraph.ts b/ts/docx/paragraph.ts index 1558525e23..7c0430a507 100644 --- a/ts/docx/paragraph.ts +++ b/ts/docx/paragraph.ts @@ -90,8 +90,16 @@ export class Paragraph { return this; } - pageBreak() { + thematicBreak() { this.properties.push(new ThematicBreak()); return this; } + + pageBreak () { + this.properties.push(new ThematicBreak()); + + + paragraphProperties.push(pBreak); + return this; + } } \ No newline at end of file diff --git a/ts/tests/paragraphTest.ts b/ts/tests/paragraphTest.ts index bf9383c95d..a038eba293 100644 --- a/ts/tests/paragraphTest.ts +++ b/ts/tests/paragraphTest.ts @@ -77,9 +77,9 @@ describe('Paragraph', () => { }); }); - describe("#pageBreak()", () => { + describe("#thematicBreak()", () => { it("should add thematic break to JSON", () => { - paragraph.pageBreak(); + paragraph.thematicBreak(); var newJson = jsonify(paragraph); assert.isDefined(newJson.p[1].pPr[1].pBdr);