markdown-it / markdown-it-container

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

Specify different open close markers? #4

Closed benfrain closed 8 years ago

benfrain commented 8 years ago

Is it possible currently to specify different open/close markers? I have a specific use case that may not be worth the bother but I welcome your thoughts:

I have a book in markdown that is consumed by Leanpub and converted to eBook by their parser. I want to re-use the same markdown to generate a free HTML version of the book. Part of the 'custom' syntax Leanpub has is the ability to write an info box like this:

I> Here is an info box

And that creates an info box of that text until the next new line in the outputted eBook.

I'd like to use this plugin to achieve the same kind of thing but in HTML. For example, given the above in markdown, I'd like to generate this in HTML:

<aside class="info">Here is an info box</aside>

Is it possible to set a marker for the beginning of the container as I> and an end as a newline \n - even if as regex (rather than just change the character used for the three character marker e.g. :::)?

Thanks again and appreciate this is probably a very specific request/question :)

puzrin commented 8 years ago

No, markers should follow principle of fenced blocks markup.