markdown-it-regexp
markdown-it-regexp copied to clipboard
Using the plugin twice with the same markdown-it instance
I tried creating a second plugin with the following code:
var doubleSpaces = mdRegex(
// two consecutive spaces
/\s\s/,
// replace with two nonbreaking spaces
function(match, utils) { // This doesn't get called :/
console.log('Two consecutive spaces found');
return ' ';
}
)
I use markdown-it
as:
var md = require('markdown-it')()
.use(chordPattern)
.use(doubleSpaces);
var result = md.render(str);
However the function doesn't get called.
Here's my code with the issue: here.