NodeBB/nodebb-plugin-markdown

How to disable use of markdown-it-checkbox...

alfazaz opened this issue · 5 comments

Hello !

I'm trying to make a nodebb plugin to extend nodebb-plugin-markdown without changing its code... One problem is that I really don't want markdown-it-checkbox (problem with LaTeX formulas parsing, like $P[X]=...$)... I see no option to disable markdown-it-checkbox without removing it from this plugin (in updateParserRules). I would like not to have to change your code...

Is there a way to revert, from another plugin, the following code of your plugin (in index.js) ?

updateParserRules: function (parser) { // Add support for checkboxes parser.use(require('markdown-it-checkbox'), { divWrap: true, divClass: 'plugin-markdown', });

(Is there a way to disable the "parser.use" after this with a hook ?)

Thanks in advance !

More info on what I try to do here :
https://community.nodebb.org/topic/14141/proper-way-to-add-latex-with-markdown-it-texmath-and-katex-to-nodebb-plugin-markdown

No need for something so complicated I think, I'll just make it a toggle-able option!

v8.10.3 :)

Great, thanks ! I will be able to go forward on my plugin work tomorrow. :-)

@julianlam Just a detail : you forgot to remove a console.log in index.js (line 238)... ;-)

You can close this issue after.

v8.10.4 😆