#548 #508 Restart numbered lists

This commit is contained in:
Dolan
2021-03-12 03:58:05 +00:00
parent 9864cdea16
commit 0b88cb0ca5
20 changed files with 430 additions and 163 deletions

View File

@ -1,6 +1,7 @@
// http://officeopenxml.com/WPbookmark.php
import { uniqueId } from "convenience-functions";
import { XmlComponent } from "file/xml-components";
import * as shortid from "shortid";
import { TextRun } from "../run";
import { BookmarkEndAttributes, BookmarkStartAttributes } from "./bookmark-attributes";
@ -10,7 +11,7 @@ export class Bookmark {
public readonly end: BookmarkEnd;
constructor(options: { readonly id: string; readonly children: TextRun[] }) {
const linkId = shortid.generate().toLowerCase();
const linkId = uniqueId();
this.start = new BookmarkStart(options.id, linkId);
this.children = options.children;

View File

@ -1,6 +1,5 @@
// http://officeopenxml.com/WPhyperlink.php
import * as shortid from "shortid";
import { uniqueId } from "convenience-functions";
import { XmlComponent } from "file/xml-components";
import { ParagraphChild } from "../paragraph";
@ -33,7 +32,7 @@ export class ConcreteHyperlink extends XmlComponent {
export class InternalHyperlink extends ConcreteHyperlink {
constructor(options: { readonly child: ParagraphChild; readonly anchor: string }) {
super(options.child, shortid.generate().toLowerCase(), options.anchor);
super(options.child, uniqueId(), options.anchor);
}
}