fix(html-to-react): fix toc regex

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-08-26 12:49:50 +02:00
parent ffe48f2fd2
commit 41a1a53d08

View file

@ -19,7 +19,7 @@ class Plugin {
public readonly START_LEVEL_ATTRIBUTE_NAME = 'startLevel'
public readonly END_LEVEL_ATTRIBUTE_NAME = 'endLevel'
private readonly TOC_PLACEHOLDER = /^\[\[toc(?::(\d+):(\d+))?]]|\[toc(?::(\d+):(\d+))?]$/i
private readonly TOC_PLACEHOLDER = /^(?:\[\[toc(?::(\d+):(\d+))?]]|\[toc(?::(\d+):(\d+))?])$/i
public constructor(md: MarkdownIt, tocOptions?: Partial<TocOptions>) {
this.tocOptions = {