hukkin / mdformat-gfm

Mdformat plugin for GitHub Flavored Markdown compatibility
MIT License
13 stars 2 forks source link

[Feature Request] Add support for alerts #39

Closed timmens closed 4 months ago

timmens commented 4 months ago

GitHub has supported alerts since the end of 2023; see the community discussion here.

For example:

[!NOTE] This is a note.

Problem

Running mdformat (with mdformat-gfm installed) changes the correct syntax:

> [!NOTE]
> This is a note.

to

> \[!NOTE\] This is a note.

Which does not correctly render.

Request

Can this feature be supported? If not, is there some way to force the linter to ignore these cases?

KyleKing commented 4 months ago

I have a package to support GitHub alerts, mdformat-gfm-alerts!

Let me know if you run into any issues

timmens commented 4 months ago

I can't believe I didn't find this earlier. This is amazing, and it works perfectly!