diff --git a/README.md b/README.md index ed84d3b..e3e8937 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,6 @@ prismjs: - [markdown-it-toc-and-anchor](https://www.npmjs.com/package/markdown-it-toc-and-anchor) - [markdown-it-container](https://www.npmjs.com/package/markdown-it-container) - [markdown-it-multimd-table](https://www.npmjs.com/package/markdown-it-multimd-table) -- [markdown-it-collapsible](https://www.npmjs.com/package/markdown-it-collapsible) - [markdown-it-katex](https://www.npmjs.com/package/@neilsustc/markdown-it-katex) If you want to use katex, you must add this css style to your website: diff --git a/lib/renderer/index.js b/lib/renderer/index.js index 0c6a3b9..e74c6fa 100644 --- a/lib/renderer/index.js +++ b/lib/renderer/index.js @@ -13,7 +13,6 @@ const default_plugins = [ 'markdown-it-sup', 'markdown-it-task-checkbox', 'markdown-it-toc-and-anchor', - 'markdown-it-collapsible', 'markdown-it-pangu', './markdown-it-container', './markdown-it-furigana', diff --git a/lib/renderer/markdown-it-container/index.js b/lib/renderer/markdown-it-container/index.js index 938ad51..64219d9 100644 --- a/lib/renderer/markdown-it-container/index.js +++ b/lib/renderer/markdown-it-container/index.js @@ -4,14 +4,14 @@ module.exports = function (md, options) { md.use(plugin, 'note', { validate: function (params) { - return params.trim().match(/^note\s+(default|primary|success|info|warning|danger)$/); + return params.trim().match(/^(default|primary|success|info|warning|danger)(.*)$/); }, render: function (tokens, idx) { - var m = tokens[idx].info.trim().match(/^note\s+(.*)$/); + var m = tokens[idx].info.trim().match(/^(.*)$/); if (tokens[idx].nesting === 1) { // opening tag - return '