Fix for anchors to use lodash kebabcase function
This commit is contained in:
parent
9bbc124e02
commit
576ba7fde2
@ -5,7 +5,7 @@ var Promise = require('bluebird'),
|
|||||||
mdEmoji = require('markdown-it-emoji'),
|
mdEmoji = require('markdown-it-emoji'),
|
||||||
mdTaskLists = require('markdown-it-task-lists'),
|
mdTaskLists = require('markdown-it-task-lists'),
|
||||||
mdAbbr = require('markdown-it-abbr'),
|
mdAbbr = require('markdown-it-abbr'),
|
||||||
mdAnchor = require('markdown-it-toc-and-anchor').default,
|
mdAnchor = require('markdown-it-anchor'),
|
||||||
mdFootnote = require('markdown-it-footnote'),
|
mdFootnote = require('markdown-it-footnote'),
|
||||||
mdExternalLinks = require('markdown-it-external-links'),
|
mdExternalLinks = require('markdown-it-external-links'),
|
||||||
mdExpandTabs = require('markdown-it-expand-tabs'),
|
mdExpandTabs = require('markdown-it-expand-tabs'),
|
||||||
@ -35,8 +35,11 @@ var mkdown = md({
|
|||||||
.use(mdTaskLists)
|
.use(mdTaskLists)
|
||||||
.use(mdAbbr)
|
.use(mdAbbr)
|
||||||
.use(mdAnchor, {
|
.use(mdAnchor, {
|
||||||
tocClassName: 'toc',
|
slugify: _.kebabCase,
|
||||||
anchorClassName: 'toc-anchor'
|
permalink: true,
|
||||||
|
permalinkClass: 'toc-anchor',
|
||||||
|
permalinkSymbol: '#',
|
||||||
|
permalinkBefore: true
|
||||||
})
|
})
|
||||||
.use(mdFootnote)
|
.use(mdFootnote)
|
||||||
.use(mdExternalLinks, {
|
.use(mdExternalLinks, {
|
||||||
|
@ -67,7 +67,6 @@
|
|||||||
"markdown-it-external-links": "0.0.5",
|
"markdown-it-external-links": "0.0.5",
|
||||||
"markdown-it-footnote": "^3.0.1",
|
"markdown-it-footnote": "^3.0.1",
|
||||||
"markdown-it-task-lists": "^1.4.1",
|
"markdown-it-task-lists": "^1.4.1",
|
||||||
"markdown-it-toc-and-anchor": "^4.1.1",
|
|
||||||
"moment": "^2.14.1",
|
"moment": "^2.14.1",
|
||||||
"moment-timezone": "^0.5.5",
|
"moment-timezone": "^0.5.5",
|
||||||
"passport": "^0.3.2",
|
"passport": "^0.3.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user