Fix styling and linting
This commit is contained in:
@ -154,7 +154,6 @@ describe("External styles factory", () => {
|
||||
],
|
||||
rootKey: "w:style",
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Styles } from "./";
|
||||
import * as fastXmlParser from "fast-xml-parser";
|
||||
import { ImportedXmlComponent, ImportedRootElementAttributes } from "./../../file/xml-components";
|
||||
|
||||
import { Styles } from "./";
|
||||
import { ImportedRootElementAttributes, ImportedXmlComponent } from "./../../file/xml-components";
|
||||
|
||||
const parseOptions = {
|
||||
ignoreAttributes: false,
|
||||
@ -51,7 +52,8 @@ export class ExternalStylesFactory {
|
||||
return importedStyle;
|
||||
}
|
||||
|
||||
convertElement(elementName: string, element: any): ImportedXmlComponent {
|
||||
// tslint:disable-next-line:no-any
|
||||
public convertElement(elementName: string, element: any): ImportedXmlComponent {
|
||||
const xmlElement = new ImportedXmlComponent(elementName, element._attr);
|
||||
if (typeof element === "object") {
|
||||
Object.keys(element)
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { Color, Italics, Size } from "../paragraph/run/formatting";
|
||||
|
||||
import { Styles } from "./";
|
||||
import { DocumentAttributes } from "../document/document-attributes";
|
||||
import { Color, Italics, Size } from "../paragraph/run/formatting";
|
||||
import { Styles } from "./";
|
||||
|
||||
import {
|
||||
Heading1Style,
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { XmlComponent, BaseXmlComponent } from "file/xml-components";
|
||||
import { BaseXmlComponent, XmlComponent } from "file/xml-components";
|
||||
import { DocumentDefaults } from "./defaults";
|
||||
import { ParagraphStyle } from "./style";
|
||||
|
||||
export class Styles extends XmlComponent {
|
||||
constructor(_initialStyles?: BaseXmlComponent) {
|
||||
constructor(initialStyles?: BaseXmlComponent) {
|
||||
super("w:styles");
|
||||
if (_initialStyles) {
|
||||
this.root.push(_initialStyles);
|
||||
if (initialStyles) {
|
||||
this.root.push(initialStyles);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user