Closed chris-dura closed 6 years ago
It seems that when passing a multiline the tokens[idx].info
only has the first line, and not the content of the container...
::: spoiler click me\n*content*\n:::
::: warning
*here be dragons*
:::
var md = require('markdown-it')();
md.use(require('markdown-it-container'), 'spoiler', {
...
render: function (tokens, idx) {
console.log(tokens[idx].info); // output: spoiler click me\n*content*\n:::
...
}
})
.use(require('markdown-it-container'), 'warning', {
...
render: function (tokens, idx) {
console.log(tokens[idx].info); // output: warning
...
}
});
If you need nesting:
::: warning
:::: left-col
::::
:::: middle
::::
:::: right
::::
:::
Principle is the same as with fenced blocks - vary delimiter length.
Hello, I've looked through the documentation, and I'm having a hard time figuring out how to do what I need. I think part of the problem is that the example only works when the markdown is all on a singleline, but the other example is on multilines:
Basically, with the following:
I'd like to render out the following HTML: