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

@ -5,13 +5,12 @@
*/
import MarkdownIt from 'markdown-it'
import toc from 'markdown-it-toc-done-right'
import { TocAst } from '../../../external-types/markdown-it-toc-done-right/interface'
import toc, { TocAst } from 'markdown-it-toc-done-right'
import { slugify } from '../../editor/table-of-contents/table-of-contents'
export type DocumentTocPluginOptions = (ast: TocAst) => void
export const documentToc:MarkdownIt.PluginWithOptions<DocumentTocPluginOptions> = (markdownIt, onToc) => {
export const documentToc: MarkdownIt.PluginWithOptions<DocumentTocPluginOptions> = (markdownIt, onToc) => {
if (!onToc) {
return
}