Utility functions for docutils.
Class |
|
Custom reST's mark-up dispatcher. |
Class |
|
No class docstring; 0/1 method, 1/1 class method documented |
Class |
|
A dummy reporter; write nothing. |
Class |
|
A base class for reference roles. |
Class | sphinx |
Monkey-patch directive and role dispatch, so that domain-specific markup takes precedence. |
Class |
|
A base class for Sphinx directives. |
Class |
|
Better FileOutput class for Sphinx. |
Class |
|
A base class for Sphinx roles. |
Class |
|
A base class for Sphinx translators. |
Class |
|
Undocumented |
Exception |
|
Undocumented |
Function | docutils |
Create namespace for reST parsers. |
Function | du19 |
Undocumented |
Function | is |
Check the *name* directive is already registered. |
Function | is |
Undocumented |
Function | is |
Check the *node* is already registered. |
Function | is |
Check the *name* role is already registered. |
Function | new |
Return a new empty document object. This is an alternative of docutils'. |
Function | patch |
Patch to docutils temporarily. |
Function | patched |
Patch docutils.languages.get_language() temporarily. |
Function | patched |
Patch docutils.parsers.rst.languages.get_language(). Starting from docutils 0.17, get_language() in ``rst.languages`` also has a reporter, which needs to be disabled temporarily. |
Function | register |
Register a directive to docutils. |
Function | register |
Register a node to docutils. |
Function | register |
Register a role to docutils. |
Function | switch |
Switch current source input of state temporarily. |
Function | unregister |
Unregister a node from docutils. |
Function | unregister |
Unregister a role from docutils. |
Function | using |
Let docutils know the location of ``docutils.conf`` for Sphinx. |
Variable | __document |
Undocumented |
Variable | additional |
Undocumented |
Variable | logger |
Undocumented |
Variable | report |
Undocumented |
Return a new empty document object. This is an alternative of docutils'. This is a simple wrapper for ``docutils.utils.new_document()``. It caches the result of docutils' and use it on second call for instantiation. This makes an instantiation of document nodes much faster.
Parameters | |
sourcestr | Undocumented |
settings:Any | Undocumented |
Returns | |
nodes.document | Undocumented |
Patch docutils.parsers.rst.languages.get_language(). Starting from docutils 0.17, get_language() in ``rst.languages`` also has a reporter, which needs to be disabled temporarily. This should also work for old versions of docutils, because reporter is none by default. refs: https://github.com/sphinx-doc/sphinx/issues/10179
Returns | |
Generator[ | Undocumented |
Register a role to docutils. This modifies global state of docutils. So it is better to use this inside ``docutils_namespace()`` to prevent side-effects.
Parameters | |
name:str | Undocumented |
role:RoleFunction | Undocumented |