Merge pull request #41 from jacwright/patch-1

Fix page/thematic breaks
This commit is contained in:
Dolan
2017-09-15 15:57:22 +01:00
committed by GitHub
2 changed files with 5 additions and 7 deletions

View File

@ -103,7 +103,7 @@ export class Paragraph extends XmlComponent {
}
public pageBreak(): Paragraph {
this.properties.push(new PageBreak());
this.root.push(new PageBreak());
return this;
}

View File

@ -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"}}]},
],
}],
});
});