Markup: notifications in markup: info, success, warning, error

Created on 30 Apr 2016  Â·  9Comments  Â·  Source: github/markup

Would be great to have some support both at markup and renderer level (CSS) for notifications panel. Something like (taken from Isabel Castillo blog)
image

Of course underlying markups libraries would have to support such a feature.

In mardown it could be for example:

! This is an info message.
!v This is a success message.
!! Consider this a warning.
!x This is an error message.

It would ease a lot to have good rendered README when explaining how to use your project/library or whatever else.

Most helpful comment

Still a hack, but IMHO better…

:exclamation: | Some text.
---: | :---

All 9 comments

A simple hack (sans color) might be to use icons:
:information_source: :information_source:
:ballot_box_with_check: :ballot_box_with_check:
:warning: :warning:
:x: :x:

or
:exclamation: :exclamation:
:heavy_multiplication_x: :heavy_multiplication_x:

good list of more here: https://gist.github.com/rxaviers/7360908

rST has these kind of blocks officially (admonitions), but the HTML whitelist is way too aggressive and filters them out, in the worst case leading to misunderstandings because of the missing visual cue how to interpret the text.

See also https://github.com/github/markup/issues/905#issuecomment-325681561, namespacing could be a viable alternative to just kicking CSS out.

The emoji hack is a good idea — we won't be expanding Markdown with new syntax, so we won't be adding it as a GitHub-specific feature.

The emoji hack is a good idea

Except that it does not provide paragraph highlighting.

One would have to use blockquote to _mark_ a paragraph and an emoji to type it.

ℹ️ this is an information

✔️ this is a success

⚠️ this is a warning

:x: this is an error

Honestly such a hacking is IMO not exactly what was expected.

Still a hack, but IMHO better…

:exclamation: | Some text.
---: | :---

Still a hack, but IMHO better…

âť— Some text.

How can I do that?

Would be great to have some support both at markup and renderer level (CSS) for notifications panel. Something like (taken from Isabel Castillo blog)
image

Of course underlying markups libraries would have to support such a feature.

In mardown it could be for example:

! This is an info message.
!v This is a success message.
!! Consider this a warning.
!x This is an error message.

It would ease a lot to have good rendered README when explaining how to use your project/library or whatever else.

I know it has been 4 years but anyways. I guess you wanted something like that: https://github.com/MuhammedBeraKoc/github-notification-markups.

How can I do that?

It is just a table...

:bangbang: | This is important
:---: | :---

:bangbang: | This is important
:---: | :---

@MuhammedBeraKoc thanks for the trick but it still looks quite hacky. I would really prefer an official inclusion in the markup.

FYI my implementation of this in commonmark-java : commonmark-ext-notifications is now an official commonmark-java extension.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alhadis picture Alhadis  Â·  6Comments

woodruffw picture woodruffw  Â·  6Comments

HyoKim picture HyoKim  Â·  5Comments

thomaszbz picture thomaszbz  Â·  3Comments

zoffixznet picture zoffixznet  Â·  6Comments