djm / remark-shortcodes

A custom Markdown syntax parser for remark that adds support for shortcodes.
MIT License
45 stars 7 forks source link

Add support for attributes with no value #18

Closed Princesseuh closed 3 years ago

Princesseuh commented 4 years ago

Hi!

This add support for attributes with no values. We use it at @gamedevalliance for a video shortcode which work for example like this:

[[Video src="/videos/pico-8/jelpi.mp4" autoplay muted loop controls]]

The code works perfectly but was written quite hastily, if the proposition is accepted, I can rewrite it in a better style if needed. My version use String.matchAll which bump the node requirement to Node 12.0.0 (the current active LTS support this)

djm commented 4 years ago

Hi @Princesseuh!

Yeah, that seems like a handy feature to have, I would definitely accept a PR that added it with tests (and documentation if you like, but I can do that if necessary).

As for the Node version: I only really have the resource to maintain support for the latest LTS anyway, so feel free to bump that and I'll bump the major version when I release it.

Thanks!

djm commented 3 years ago

Closing this due to no response.