arobase-che / remark-attr

Remark plugin to add support for custom attributes
Other
58 stars 16 forks source link

Support attributes in the same line as an ATX heading? #10

Closed rauschma closed 4 years ago

rauschma commented 4 years ago

Thanks for this plugin!

The following syntax is relatively common (Pandoc, markdown-it-attrs, etc.). It’d be great if remark-attr could support it.

## My heading {#my-heading}

Pandoc additionally supports:

## My heading ## {#my-heading}

My heading {#my-heading}
----------
arobase-che commented 4 years ago

Approved, will try to support it ASAP.

rauschma commented 4 years ago

Excellent, thanks!

[Edit: created a new issue for a question I had.]

Eyas commented 4 years ago

Are there any updates on this? Prettier 2.0.0 will automatically reformat:

## My Heading
{id=abc}

to

## My Heading

{id=abc}

which breaks remark-attr.

Supporting pandoc-style attributes will make it much easier to keep using this plugin.

arobase-che commented 4 years ago

I need to test it a little more. Including using Prettier 2. If you want so to see, it's on the branch atx_inline.

I wish I can ship it today.

arobase-che commented 4 years ago

Done ! :)
0.11.0 shipped with that feature.

I wish I had update the readme but it will be for the next minor release (0.11.1).