Make Paragraph declaritive

This commit is contained in:
Dolan
2019-06-12 01:03:36 +01:00
parent 5c1a731314
commit cb42c74a8d
33 changed files with 451 additions and 497 deletions

View File

@ -166,9 +166,9 @@ describe("ParagraphStyle", () => {
"w:bottom": {
_attr: {
"w:color": "auto",
"w:space": "1",
"w:space": 1,
"w:val": "single",
"w:sz": "6",
"w:sz": 6,
},
},
},
@ -231,12 +231,12 @@ describe("ParagraphStyle", () => {
});
it("#outlineLevel", () => {
const style = new ParagraphStyle("myStyleId").outlineLevel("1");
const style = new ParagraphStyle("myStyleId").outlineLevel(1);
const tree = new Formatter().format(style);
expect(tree).to.deep.equal({
"w:style": [
{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } },
{ "w:pPr": [{ "w:outlineLvl": { _attr: { "w:val": "1" } } }] },
{ "w:pPr": [{ "w:outlineLvl": { _attr: { "w:val": 1 } } }] },
],
});
});