markdown-it / markdown-it-container

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

Incompatibility with markdown-it-attrs #39

Closed bendavis78 closed 3 years ago

bendavis78 commented 3 years ago

With markdown-it-attrs, a paragraph element is styled like so:

# some heading

This is a paragraph {.some-class-name}
<h1>some heading</h1>
<p class="some-class-name">This is a paragraph</p>

However, in a container, the attribute is swallowed or not applied:

::: my-container
# some heading

This is a paragraph {.some-class-name}
:::
<div class="my-container">
  <h1>some heading</h1>
  <p>This is a paragraph</p>
</div>

Strangely, other methods of using markdown-it-attrs works fine, eg, spans:

::: my-container
This is a paragraph [this is a span]{.some-class-name}
:::
<div class="my-container">
  <p>This is a paragraph <span class="some-class-name">this is a span</span></p>
</div>
puzrin commented 3 years ago

Sorry, can't help with third party plugins. You'd better ask markdown-it-attrs author.