#1529 Add word break feature

This commit is contained in:
Dolan
2022-06-15 00:07:12 +01:00
parent bdbd15e7d9
commit f414b4ee9a
13 changed files with 87 additions and 34 deletions

View File

@ -4,6 +4,7 @@ import { Formatter } from "export/formatter";
import { BorderStyle } from "file/border";
// import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run";
import { ShadingType } from "file/shading";
import { SpaceType } from "file/space-type";
import { Run } from "./";
import { EmphasisMarkType } from "./emphasis-mark";
@ -521,4 +522,20 @@ describe("Run", () => {
});
});
});
describe("#space", () => {
it("should correctly set the border", () => {
const run = new Run({
space: SpaceType.PRESERVE,
});
const tree = new Formatter().format(run);
expect(tree).to.deep.equal({
"w:r": {
_attr: {
"xml:space": "preserve",
},
},
});
});
});
});