iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.67k stars 277 forks source link

Feature: Support Github Flavor notes #632

Open n-crespo opened 9 months ago

n-crespo commented 9 months ago

In Github flavored markdown, a note or "alert" can be created with the following syntax:

    > [!Note]
    > *insert note here*

and the note will appear with an icon like so:

[!Note] this is a note

Here is an screenshot:

image

[!Important] and [!Warning] have a similar layout.

This is not supported in markdown preview, and I would love to see it implemented. I understand, however, if the goal of the plugin is to support vanilla markdown, not the GitHub flavor.

kiran94 commented 8 months ago

Linking the official documentation which has the full list of available options https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts

kunring commented 7 months ago

This would require a plugin for markdown-it. I'm unable to find one on npm.

komar007 commented 1 week ago

It looks like there's this now: https://www.npmjs.com/package/markdown-it-github-alerts.