Make hyperlinks declarative

This commit is contained in:
Dolan
2019-12-18 21:11:15 +00:00
parent 2bece0bb61
commit c68dc8c52a
14 changed files with 114 additions and 53 deletions

View File

@ -1,5 +1,6 @@
import { IXmlableObject, XmlComponent } from "file/xml-components";
import { Paragraph, ParagraphProperties, TableOfContents } from "../..";
import { File } from "../../../file";
import { SectionProperties, SectionPropertiesOptions } from "./section-properties/section-properties";
export class Body extends XmlComponent {
@ -24,12 +25,12 @@ export class Body extends XmlComponent {
this.sections.push(new SectionProperties(options));
}
public prepForXml(): IXmlableObject | undefined {
public prepForXml(file?: File): IXmlableObject | undefined {
if (this.sections.length === 1) {
this.root.push(this.sections.pop() as SectionProperties);
}
return super.prepForXml();
return super.prepForXml(file);
}
public push(component: XmlComponent): void {