-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
collapsible
option to admonition directives (#12507)
This PR adds the `collapsible` and option to the core admonition type directives, which are propagated to the nodes, e.g. ```restructuredtext .. admonition:: title :collapsible: content .. note:: content :collapsible: closed ``` For the HTML5 writer, this replaces the outer `div` with a `details` tag, and the title `p` with a `summary` tag (with an `open` attribute if set), e.g. ```html <div class="admonition note"> <p class="admonition-title">Note</p> <p>hallo</p> </div> ``` changes to ```html <details class="admonition note" open="open"> <summary class="admonition-title">Note</summary> <p>hallo</p> </details> ``` Co-authored-by: Adam Turner <[email protected]>
- Loading branch information
1 parent
4936b27
commit 134bd7f
Showing
11 changed files
with
340 additions
and
54 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
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
Oops, something went wrong.