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 standard rst admonitions #132

Closed
anntzer opened this issue Oct 24, 2018 · 4 comments · Fixed by #242
Closed

Support standard rst admonitions #132

anntzer opened this issue Oct 24, 2018 · 4 comments · Fixed by #242

Comments

@anntzer
Copy link

anntzer commented Oct 24, 2018

rst provides standard "admonitions" (http://docutils.sourceforge.net/docs/ref/rst/directives.html#admonitions) such as

.. note::
   Hello world!

which gets rendered by default (by rst2html) as
screenshot_20181024_142909
but readme_renderer just yields two paragraphs with no markup at all

<div>
<p>Note</p>
<p>Hello, world!</p>
</div>

It would be nice if admonitions were supported.
Perhaps related to #120.

@donjar
Copy link

donjar commented Oct 28, 2018

I have played around, and it seems that the rendered HTML by default is

<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Hello, world!</p>
</div>

So I believe if we whitelist admonition and the admonition classes in div ("attention", "caution", "danger", "error", "hint", "important", "note", "tip", "warning", "admonition"), and first, admonition-title, last in p in the referenced PR, it should work.

@kdeldycke
Copy link

This is a great feature to support. It allows package maintainer to display big warning for major package update or breaking changes.

For instance, I use a .. DANGER:: admonition at the very top of my package to announce a renaming:

@stuij
Copy link

stuij commented Sep 24, 2020

I'm just adding a +1 in support for this feature.

We have a lot of notes in our ABI docs (current docs up on Github and future docs that will be added), and right now the rendering of them on Github is confusing because of this:

https://github.com/ARM-software/abi-aa

Can we expect any chance of this being supported? It would be really appreciated.

@pzhlkj6612
Copy link

Hi @stuij .

We have a lot of notes in our ABI docs (current docs up on Github and future docs that will be added), and right now the rendering of them on Github is confusing because of this...

Since you mentioned GitHub, I think that what you said is not related to this issue or even this repo. You could have a look at github/markup#68 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants