#1529 - Word wrap feature
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import { BorderElement, IBorderOptions } from "@file/border";
|
||||
import { IShadingAttributesProperties, Shading } from "@file/shading";
|
||||
import { SpaceType } from "@file/space-type";
|
||||
import { ChangeAttributes, IChangedAttributesProperties } from "@file/track-revision/track-revision";
|
||||
import { HpsMeasureElement, IgnoreIfEmptyXmlComponent, OnOffElement, StringValueElement, XmlComponent } from "@file/xml-components";
|
||||
|
||||
@ -46,7 +45,6 @@ export interface IRunStylePropertiesOptions {
|
||||
readonly imprint?: boolean;
|
||||
readonly revision?: IRunPropertiesChangeOptions;
|
||||
readonly border?: IBorderOptions;
|
||||
readonly space?: SpaceType;
|
||||
}
|
||||
|
||||
export interface IRunPropertiesOptions extends IRunStylePropertiesOptions {
|
||||
|
@ -3,7 +3,6 @@ import { expect } from "chai";
|
||||
import { Formatter } from "@export/formatter";
|
||||
import { BorderStyle } from "@file/border";
|
||||
import { ShadingType } from "@file/shading";
|
||||
import { SpaceType } from "@file/space-type";
|
||||
|
||||
import { EmphasisMarkType } from "./emphasis-mark";
|
||||
import { PageNumber, Run } from "./run";
|
||||
@ -520,20 +519,4 @@ 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",
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -9,7 +9,6 @@ import { Begin, End, Separate } from "./field";
|
||||
import { NumberOfPages, NumberOfPagesSection, Page } from "./page-number";
|
||||
import { IRunPropertiesOptions, RunProperties } from "./properties";
|
||||
import { Text } from "./run-components/text";
|
||||
import { TextAttributes } from "./text-attributes";
|
||||
|
||||
export interface IRunOptions extends IRunPropertiesOptions {
|
||||
readonly children?: readonly (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string)[];
|
||||
@ -37,10 +36,6 @@ export class Run extends XmlComponent {
|
||||
}
|
||||
}
|
||||
|
||||
if (options.space) {
|
||||
this.root.push(new TextAttributes({ space: options.space }));
|
||||
}
|
||||
|
||||
if (options.children) {
|
||||
for (const child of options.children) {
|
||||
if (typeof child === "string") {
|
||||
|
Reference in New Issue
Block a user