antfu / markdown-it-mdc

MDC (Markdown Components) syntax for markdown-it.
MIT License
101 stars 3 forks source link

feat: strip p if only child #4

Closed nobkd closed 7 months ago

nobkd commented 11 months ago

Description

Somewhat a followup on #2

Through this PR the stripping of <p> only happens if there is only one p and no other sibling in the parent. Also see first paragraph of https://github.com/antfu/markdown-it-mdc/pull/2#issuecomment-1719335739

Linked Issues

partially fixes #3, as paragraphs are not stripped when multiple ones are in a slot now.

Additional context