fix: handle headers for all editors (#1127)

This commit is contained in:
NGPixel
2019-10-27 21:08:42 -04:00
parent 4b0f5fde98
commit 37ce116dd2
4 changed files with 38 additions and 16 deletions

View File

@@ -1,8 +1,6 @@
const md = require('markdown-it')
const mdAnchor = require('markdown-it-anchor')
const mdAttrs = require('markdown-it-attrs')
const _ = require('lodash')
const uslug = require('uslug')
const quoteStyles = {
Chinese: '””‘’',
@@ -32,14 +30,6 @@ module.exports = {
}
})
mkdown.use(mdAnchor, {
slugify: s => uslug(s),
permalink: true,
permalinkClass: 'toc-anchor',
permalinkSymbol: '¶',
permalinkBefore: true
})
mkdown.use(mdAttrs)
for (let child of this.children) {