feat: transfer comments property to File CoreProperties like numbering.
This commit is contained in:
@ -5,6 +5,7 @@ import { File } from "file";
|
||||
import { Formatter } from "../formatter";
|
||||
import { ImageReplacer } from "./image-replacer";
|
||||
import { NumberingReplacer } from "./numbering-replacer";
|
||||
import { PrettityType } from "./packer";
|
||||
|
||||
interface IXmlifyedFile {
|
||||
readonly data: string;
|
||||
@ -42,7 +43,7 @@ export class Compiler {
|
||||
this.numberingReplacer = new NumberingReplacer();
|
||||
}
|
||||
|
||||
public compile(file: File, prettifyXml?: boolean | string): JSZip {
|
||||
public compile(file: File, prettifyXml?: boolean | PrettityType): JSZip {
|
||||
const zip = new JSZip();
|
||||
const xmlifiedFileMapping = this.xmlifyFile(file, prettifyXml);
|
||||
const map = new Map<string, IXmlifyedFile | IXmlifyedFile[]>(Object.entries(xmlifiedFileMapping));
|
||||
@ -65,7 +66,7 @@ export class Compiler {
|
||||
return zip;
|
||||
}
|
||||
|
||||
private xmlifyFile(file: File, prettify?: boolean | string): IXmlifyedFileMapping {
|
||||
private xmlifyFile(file: File, prettify?: boolean | PrettityType): IXmlifyedFileMapping {
|
||||
const documentRelationshipCount = file.Document.Relationships.RelationshipCount + 1;
|
||||
|
||||
const documentXmlData = xml(
|
||||
|
Reference in New Issue
Block a user