Created
May 19, 2018 19:59
-
-
Save blacroix/b24394c230448bcc64b741228ff83e6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toc = require('remark-toc'); | |
module.exports = { | |
activate() { | |
const {MDEPreview} = inkdrop.components.classes; | |
if (MDEPreview) { | |
MDEPreview.remarkPlugins.push(toc); | |
} | |
}, | |
deactivate () { | |
const { MDEPreview } = inkdrop.components.classes | |
if (MDEPreview) { | |
MDEPreview.remarkPlugins = MDEPreview.remarkPlugins.filter(function (plugin) { | |
return plugin !== toc; | |
}) | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment