table of contents extending paragraph

This commit is contained in:
Sergio Mendonça
2018-08-31 10:22:40 -03:00
parent 8d83219bb6
commit d1044d262e
2 changed files with 11 additions and 16 deletions

View File

@ -4,15 +4,11 @@ import { Formatter } from "../../export/formatter";
import { TableOfContents } from "./"; import { TableOfContents } from "./";
const DEFAULT_TOC = { const DEFAULT_TOC = {
"w:std": { "w:p": [
"w:sdtPr": {}, {
"w:sdtEndPr": {}, "w:pPr": [],
"w:sdtContent": {
"w:p": {
"w:pPr": {},
},
},
}, },
],
}; };
describe("Table of Contents", () => { describe("Table of Contents", () => {

View File

@ -1,12 +1,11 @@
import { XmlComponent } from "file/xml-components"; // import { TableOfContentsProperties } from "./properties";
import { Paragraph } from "../paragraph";
import { TableOfContentsProperties } from "./properties"; export class TableOfContents extends Paragraph {
// private readonly tocProperties: TableOfContentsProperties;
export class TableOfContents extends XmlComponent { constructor(/*tocProperties?: TableOfContentsProperties*/) {
private readonly properties: TableOfContentsProperties; super();
// this.tocProperties = tocProperties || new TableOfContentsProperties();
constructor(properties?: TableOfContentsProperties) {
super("w:std");
this.properties = properties || new TableOfContentsProperties();
} }
} }