-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Support basic glossary directive
Support glossary directive containing a definition list. Multiple terms, groups and :sorted: flag are not yet supported https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-glossary resolves: #928 releases: main, 1.0
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/guides-restructured-text/resources/template/html/body/directive/glossary.html.twig
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 @@ | ||
<div class="{{ node.glossary }}">{{ renderNode(node.value) }}</div> |
19 changes: 19 additions & 0 deletions
19
tests/Integration/tests/directives/directive-glossary/expected/index.html
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,19 @@ | ||
<!-- content start --> | ||
<div class="section" id="directive-tests"> | ||
<h1>Directive tests</h1> | ||
|
||
<div class=""><dl> | ||
<dt>environment</dt> | ||
|
||
<dd>A structure where information about all documents under the root is | ||
saved, and used for cross-referencing. The environment is pickled | ||
after the parsing stage, so that successive runs only need to read | ||
and parse new and changed documents.</dd> <dt>source directory</dt> | ||
|
||
<dd>The directory which, including its subdirectories, contains all | ||
source files for one documentation project.</dd> </dl> | ||
</div> | ||
|
||
</div> | ||
|
||
<!-- content end --> |
14 changes: 14 additions & 0 deletions
14
tests/Integration/tests/directives/directive-glossary/input/index.rst
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,14 @@ | ||
Directive tests | ||
=============== | ||
|
||
.. glossary:: | ||
|
||
environment | ||
A structure where information about all documents under the root is | ||
saved, and used for cross-referencing. The environment is pickled | ||
after the parsing stage, so that successive runs only need to read | ||
and parse new and changed documents. | ||
|
||
source directory | ||
The directory which, including its subdirectories, contains all | ||
source files for one documentation project. |