joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.42k stars 422 forks source link

Missing support for WARNING and NOTE formatting #364

Open alichtman opened 2 years ago

alichtman commented 2 years ago

Demo'd here: https://github.com/github-community/community/discussions/16925#discussion-4085374

HorridModz commented 11 months ago

Yes, we NEED this! I spent hours integrating this into my workflow with a very robust batch script, only to find that it doesn't support WARNING, NOTE, and EXCLAMATION. Literally the only Github exclusive thing it supports is the color scheme, AFAICT.

I was under the impression that the whole point of this project was to enable us to view our markown files with Github's markdown flavor and rendering engine.

If the project is just meant to support the color scheme, it would be nice if it could at least say so at the top of the README.

neilotoole commented 5 months ago

Also, TIP!

https://github.com/orgs/community/discussions/16925

PathToLife commented 4 months ago

Do we know if this is because of Github's MD rendering API not yet supporting [!NOTE] [!TIP] etc etc?

https://docs.github.com/en/rest/markdown?apiVersion=2022-11-28

For now I've found a workaround which uses the rendered html shown on the Github webpage. https://gist.github.com/PathToLife/a9c55105484a223d108a4d42e54be4bd

alichtman commented 4 months ago

Do we know if this is because of Github's MD rendering API not yet supporting [!NOTE] [!TIP] etc etc?

Yeah, I think this is the problem.

https://github.com/joeyespo/grip/blob/a3f0ab5c8942ac15cf68f790b80c0a43b3a4c71e/grip/constants.py#L22-L23

https://github.com/joeyespo/grip/blob/a3f0ab5c8942ac15cf68f790b80c0a43b3a4c71e/grip/renderers.py#L41-L84