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);