-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow admonitions to be rendered (#242)
* test: add test fixtures for admonitions Create failing examples to test desired behavior. Signed-off-by: Mike Fiedler <miketheman@gmail.com> * feat: allow `class` attributes for `div` and `p` docutils' admonitions renders the blocks using `class` attributes, which can then be styled via CSS. Allow `class` attributes to pass through the cleaner. Signed-off-by: Mike Fiedler <miketheman@gmail.com> * fix: add `class` to existing test fixtures With the allowance that `class` may now be passed for `div`, update fixtures to conform to the new directive. Signed-off-by: Mike Fiedler <miketheman@gmail.com> Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
- Loading branch information
1 parent
cb717bf
commit 30b5f9a
Showing
6 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div id="required-packages"> | ||
<div class="section" id="required-packages"> | ||
<h2>Required packages</h2> | ||
<p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p> | ||
</div> | ||
<div id="quick-development-setup"> | ||
<div class="section" id="quick-development-setup"> | ||
<h2>Quick development setup</h2> | ||
<p>Make sure you are sitting</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="admonition danger"> | ||
<p class="first admonition-title">!DANGER!</p> | ||
<p class="last">Will Robinson</p> | ||
</div> | ||
<div class="admonition note"> | ||
<p class="first admonition-title">Note</p> | ||
<p class="last">F Sharp is a note, right?</p> | ||
</div> | ||
<div class="admonition admonition-see-also"> | ||
<p class="first admonition-title">See also</p> | ||
<p class="last">A customized admonition. | ||
Read more at <a href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#admonitions" rel="nofollow">docutils</a></p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.. danger:: Will Robinson | ||
|
||
.. note:: | ||
|
||
F Sharp is a note, right? | ||
|
||
|
||
.. admonition:: See also | ||
|
||
A customized admonition. | ||
Read more at `docutils <https://docutils.sourceforge.io/docs/ref/rst/directives.html#admonitions>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters