showdownjs/showdown
markdown in html is jumping outside of the html element for custom elements
开放
#643 创建于 2019年1月22日
help wanted
仓库指标
- 星标
- (13,700 个星标)
- PR 合并指标
- (平均合并 15小时 21分钟) (30 天内合并 3 个 PR)
描述
<span markdown>
**test**
**test**
</span>
<div markdown>
**test**
**test**
</div>
<my-element markdown>
**test**
**test**
</my-element>
turns into
<p><span><strong>test</strong></span></p>
<p><strong>test</strong></p>
<div>
<p><strong>test</strong></p>
<p><strong>test</strong></p>
</div>
<p><span><my-element>test</strong></my-element></p>
<p><strong>test</strong></p>
So I'm assuming showdown is producing valid html, so it won't allow the block element inside the inline element.
But when I use a custom element and set it as a block element, I am still observing the same behaviour.
Is there a way to force showdown to treat it like a block element?