UNPKG

open-agreements

Version:

Open-source legal template filling CLI and library

27 lines • 834 B
export const REVISION_STORY_PART_PATHS = [ 'word/footnotes.xml', 'word/endnotes.xml', 'word/comments.xml', 'word/glossary/document.xml', ]; export const REVISION_SIDE_PART_PATHS = [ 'word/comments.xml', 'word/commentsExtended.xml', 'word/people.xml', 'word/footnotes.xml', 'word/endnotes.xml', ]; export const NUMBERED_HEADER_FOOTER_RE = /^word\/(?:header|footer)\d*\.xml$/; export function isRevisionHeaderFooterPart(path) { return NUMBERED_HEADER_FOOTER_RE.test(path); } export function enumerateRevisionStoryPartPaths(zip) { const paths = new Set(REVISION_STORY_PART_PATHS); for (const entry of zip.listFiles()) { if (isRevisionHeaderFooterPart(entry)) { paths.add(entry); } } return [...paths].sort(); } //# sourceMappingURL=revision-parts.js.map