#627 Add footnotes relationships

This commit is contained in:
Dolan Miu
2021-03-01 23:35:52 +00:00
parent c6e9696be0
commit f90e84a88d
12 changed files with 107 additions and 66 deletions

View File

@ -36,7 +36,10 @@ export class FootNotes extends XmlComponent {
}),
);
const begin = new Footnote(-1, FootnoteType.SEPERATOR);
const begin = new Footnote({
id: -1,
type: FootnoteType.SEPERATOR,
});
begin.add(
new Paragraph({
spacing: {
@ -49,7 +52,10 @@ export class FootNotes extends XmlComponent {
);
this.root.push(begin);
const spacing = new Footnote(0, FootnoteType.CONTINUATION_SEPERATOR);
const spacing = new Footnote({
id: 0,
type: FootnoteType.CONTINUATION_SEPERATOR,
});
spacing.add(
new Paragraph({
spacing: {
@ -64,7 +70,7 @@ export class FootNotes extends XmlComponent {
}
public createFootNote(paragraph: Paragraph): void {
const footnote = new Footnote(this.currentId);
const footnote = new Footnote({ id: this.currentId });
footnote.add(paragraph);
this.root.push(footnote);