markdown-it / markdown-it-container

Fenced container plugin for markdown-it markdown parser
MIT License
496 stars 74 forks source link

Specify multiple container names? #38

Closed mikelhamer closed 3 years ago

mikelhamer commented 3 years ago

I would like configure multiple container names to all use the default renderer. I am able to accomplish this with

md.use(require('markdown-it-container'), 'container-1');
md.use(require('markdown-it-container'), 'container-2');

Is there any downside to calling the require method more than once like this?

I am wondering if there is a simpler way. Maybe something like this?

md.use(require('markdown-it-container'), ['container-1', container-2']));

puzrin commented 3 years ago

There are no need to "improve" working things :)

mikelhamer commented 3 years ago

There are no need to "improve" working things :)

So there is nothing wrong with calling the same require method over and over again for every custom container?

puzrin commented 3 years ago

Yes. Or you can create temporary var if you wish.