mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
use types from markdown-it-toc-done-right plugin (#665)
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
63896fac19
commit
c09aaf010c
8 changed files with 7 additions and 45 deletions
|
@ -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
|
||||
}
|
|
@ -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[]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue