Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
harbournick committed Jan 22, 2025
1 parent bb109aa commit e60fbf6
Show file tree
Hide file tree
Showing 4 changed files with 2,091 additions and 843 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import xmljs from 'xml-js';
import { DocxExporter, exportSchemaToJson } from './exporter';
import { createDocumentJson } from './v2/importer/docxImporter.js';
import { getArrayBufferFromUrl } from './helpers.js';
import { baseNumbering } from './v2/exporter/helpers/base-list.definitions.js';

class SuperConverter {
static allowedElements = Object.freeze({
Expand Down Expand Up @@ -235,7 +236,9 @@ class SuperConverter {

#exportNumberingFile({ abstractNums = [], numDefs = [] }) {
const numberingPath = 'word/numbering.xml';
const numberingXml = this.convertedXml[numberingPath];
let numberingXml = this.convertedXml[numberingPath];

if (!numberingXml) numberingXml = baseNumbering;
const numbering = numberingXml.elements[0];

numbering.elements.push(...abstractNums);
Expand Down
Loading

0 comments on commit e60fbf6

Please sign in to comment.