markdown-it / markdown-it-container

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

marker characters appear within div #32

Closed networkimprov closed 4 years ago

networkimprov commented 4 years ago

Given four markers:

:::: c
text
:::

I get markers after the text:

<div class="c">
   <p>text :::</p>
</div>

With current Firefox (70). I copied the code from container_plugin() into a browser <script>.

puzrin commented 4 years ago

Works as expected. See CM docs for fenced blocks. Closing tag length should be >= 4 chars in your case, or it will be interpreted as text.

networkimprov commented 4 years ago

Thanks for this plugin. I rev'd it into a slide deck structure with little effort.

One suggestion, var auto_closed can imply "no explicit close marker" but actually means "found close marker". I'd suggest calling it has_close. That confused me for a while.