#627 Add footnotes relationships
This commit is contained in:
@ -22,13 +22,14 @@ describe("Compiler", () => {
|
||||
const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name);
|
||||
|
||||
expect(fileNames).is.an.instanceof(Array);
|
||||
expect(fileNames).has.length(14);
|
||||
expect(fileNames).has.length(15);
|
||||
expect(fileNames).to.include("word/document.xml");
|
||||
expect(fileNames).to.include("word/styles.xml");
|
||||
expect(fileNames).to.include("docProps/core.xml");
|
||||
expect(fileNames).to.include("docProps/app.xml");
|
||||
expect(fileNames).to.include("word/numbering.xml");
|
||||
expect(fileNames).to.include("word/footnotes.xml");
|
||||
expect(fileNames).to.include("word/_rels/footnotes.xml.rels");
|
||||
expect(fileNames).to.include("word/settings.xml");
|
||||
expect(fileNames).to.include("word/_rels/document.xml.rels");
|
||||
expect(fileNames).to.include("[Content_Types].xml");
|
||||
@ -62,7 +63,7 @@ describe("Compiler", () => {
|
||||
const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name);
|
||||
|
||||
expect(fileNames).is.an.instanceof(Array);
|
||||
expect(fileNames).has.length(22);
|
||||
expect(fileNames).has.length(23);
|
||||
|
||||
expect(fileNames).to.include("word/header1.xml");
|
||||
expect(fileNames).to.include("word/_rels/header1.xml.rels");
|
||||
@ -88,7 +89,7 @@ describe("Compiler", () => {
|
||||
const spy = sinon.spy(compiler["formatter"], "format");
|
||||
|
||||
compiler.compile(file);
|
||||
expect(spy.callCount).to.equal(10);
|
||||
expect(spy.callCount).to.equal(11);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -25,6 +25,7 @@ interface IXmlifyedFileMapping {
|
||||
readonly ContentTypes: IXmlifyedFile;
|
||||
readonly AppProperties: IXmlifyedFile;
|
||||
readonly FootNotes: IXmlifyedFile;
|
||||
readonly FootNotesRelationships: IXmlifyedFile;
|
||||
readonly Settings: IXmlifyedFile;
|
||||
}
|
||||
|
||||
@ -184,9 +185,13 @@ export class Compiler {
|
||||
path: "docProps/app.xml",
|
||||
},
|
||||
FootNotes: {
|
||||
data: xml(this.formatter.format(file.FootNotes, file.Document), prettify),
|
||||
data: xml(this.formatter.format(file.FootNotes.View, file.FootNotes), prettify),
|
||||
path: "word/footnotes.xml",
|
||||
},
|
||||
FootNotesRelationships: {
|
||||
data: xml(this.formatter.format(file.FootNotes.Relationships, file.FootNotes), prettify),
|
||||
path: "word/_rels/footnotes.xml.rels",
|
||||
},
|
||||
Settings: {
|
||||
data: xml(this.formatter.format(file.Settings, file.Document), prettify),
|
||||
path: "word/settings.xml",
|
||||
|
Reference in New Issue
Block a user