Skip to content

Commit b09fd2d

Browse files
committed
Move markdown plugins config to markdown.plugins
1 parent 404c567 commit b09fd2d

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"markdown": {
3-
"lalalala": {}
3+
"plugins": {
4+
"lalalala": {}
5+
}
46
}
57
}

fixture/markdown-plugin/docpress.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"markdown": {
3-
"decorate": {}
3+
"plugins": {
4+
"decorate": {}
5+
}
46
}
57
}

lib/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,9 @@ function inferTitle (contents) {
273273

274274
var mdCache = {}
275275

276-
function md (plugins, cwd) {
277-
const key = JSON.stringify(plugins || {})
276+
function md (options, cwd) {
277+
const plugins = (options && options.plugins) || {}
278+
const key = JSON.stringify(plugins)
278279
if (mdCache[key]) return mdCache[key]
279280

280281
var md = markdownIt({

0 commit comments

Comments
 (0)