Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GitHub's note/warning/information alerts? #53

Closed
4 tasks done
Elchi3 opened this issue Aug 1, 2023 · 12 comments
Closed
4 tasks done

Support GitHub's note/warning/information alerts? #53

Elchi3 opened this issue Aug 1, 2023 · 12 comments
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@Elchi3
Copy link

Elchi3 commented Aug 1, 2023

Initial checklist

Problem

Currently, there are many different ways to express note/warning/information alert boxes.

For example, from your own docs, this could be transformed into a GitHub note box:

👉 Note: before participating in our community, please read our
[code of conduct][coc].

MDN searches for the following syntax to render an alert box:

Warning: If you just see "1 3" instead of a fraction, then your browser may not support MathML.

Solution

GitHub seems to have added a syntax for note/warning/info alert boxes to GFM. They render like this:

Note

Highlights information that users should take into account, even when skimming.

Important

Crucial information necessary for users to succeed.

Warning

Critical content demanding immediate user attention due to potential risks.

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

Will this be supported in remark-gfm?

Alternatives

.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Aug 1, 2023
@remcohaszing
Copy link
Member

remark-gfm is about adding GFM syntax. What you’re proposing, is to alter HTML output. This is out of scope for this project. It would be nice to have in https://github.com/rehypejs/rehype-github though.

@remcohaszing remcohaszing closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2023
@github-actions

This comment has been minimized.

@remcohaszing remcohaszing added the 👀 no/external This makes more sense somewhere else label Aug 1, 2023
@github-actions

This comment was marked as resolved.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Aug 1, 2023
@remcohaszing remcohaszing added 🤞 phase/open Post is being triaged manually and removed 🤞 phase/open Post is being triaged manually labels Aug 1, 2023
@github-actions github-actions bot removed 👎 phase/no Post cannot or will not be acted on 👀 no/external This makes more sense somewhere else labels Aug 1, 2023
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@remcohaszing remcohaszing added 👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on labels Aug 1, 2023
@github-actions

This comment was marked as outdated.

@Elchi3
Copy link
Author

Elchi3 commented Aug 1, 2023

remark-gfm is about adding GFM syntax.

Thanks, my understanding was that > [!NOTE] , > [!IMPORTANT] and > [!WARNING] is new GFM syntax.

What you’re proposing, is to alter HTML output. This is out of scope for this project. It would be nice to have in https://github.com/rehypejs/rehype-github though.

Okay, I'm happy to file an issue there.

@remcohaszing
Copy link
Member

Oh, I see they recently added a new syntax. Now I’m not entirely sure anymore.

@remcohaszing remcohaszing reopened this Aug 1, 2023
@github-actions github-actions bot removed 👎 phase/no Post cannot or will not be acted on 👀 no/external This makes more sense somewhere else labels Aug 1, 2023
@github-actions

This comment has been minimized.

@remcohaszing remcohaszing added the 🤞 phase/open Post is being triaged manually label Aug 1, 2023
@wooorm
Copy link
Member

wooorm commented Aug 1, 2023

Hi!

is new GFM syntax.

There are tons of features GH does on its platform to markup.
There are very few features part of GFM. Here is their GFM parser: https://github.com/github/cmark-gfm. It does not include this.
So remco is correct, this does not go here!

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2023
@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label Aug 1, 2023
@github-actions

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Aug 1, 2023
@matifali matifali mentioned this issue Dec 20, 2023
4 tasks
@JounQin JounQin mentioned this issue Jan 12, 2024
4 tasks
@LuudJanssen
Copy link

LuudJanssen commented Mar 3, 2024

For anyone interested; I created a Remark plugin to transform GitHub's syntax to the directives syntax used by admonitions: remark-github-admonitions-to-directives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

4 participants