antfu / markdown-it-mdc

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

fix: props without a trailing whitespace (#6) #8

Closed KermanX closed 6 months ago

KermanX commented 6 months ago

Description

This PR fixes props without a trailing whitespace.

Examples:

Hello [World]{prop}!
**bold**{style="color: blue"}!
Inline :component{key="value" key2=value2}!

Previously, it will be turned into:

Hello <span prop="true" !="true">World</span>
<strong style="color: blue" !="true">bold</strong>
Inline <component key="value" key2="value2" !="true" />

In this PR:

Hello <span prop="true">World</span>!
<strong style="color: blue">bold</strong>!
Inline <component key="value" key2="value2" />!

Linked Issues

fix #6 fix https://github.com/slidevjs/slidev/issues/1234

Additional context