use types from markdown-it-toc-done-right plugin (#665)

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2020-11-23 12:40:54 +01:00 committed by GitHub
parent 63896fac19
commit c09aaf010c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 45 deletions

View file

@ -1,12 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
declare module 'markdown-it-toc-done-right' {
import MarkdownIt from 'markdown-it/lib'
import { TocOptions } from './interface'
const markdownItTocDoneRight: MarkdownIt.PluginWithOptions<TocOptions>
export = markdownItTocDoneRight
}

View file

@ -1,25 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
export interface TocOptions {
placeholder: string
slugify: (s: string) => string
containerClass: string
containerId: string
listClass: string
itemClass: string
linkClass: string
level: number | number[]
listType: 'ol' | 'ul'
format: (s: string) => string
callback: (tocCode: string, ast: TocAst) => void
}
export interface TocAst {
l: number
n: string
c: TocAst[]
}