Docutils node-related utility functions for Sphinx.
Unknown Field: copyright | |
Copyright 2007-2022 by the Sphinx team, see AUTHORS. | |
Unknown Field: license | |
BSD, see LICENSE for details. |
Constant | IGNORED_NODES |
Undocumented |
Constant | IMAGE_TYPE_NODES |
Undocumented |
Constant | LITERAL_TYPE_NODES |
Undocumented |
Constant | META_TYPE_NODES |
Undocumented |
Constant | NON_SMARTQUOTABLE_PARENT_NODES |
Undocumented |
Variable | explicit_title_re |
Undocumented |
Variable | indextypes |
Undocumented |
Variable | logger |
Undocumented |
Class | NodeMatcher |
A helper class for Node.findall(). |
Function | _make_id |
Convert string into an identifier and return it. |
Function | _new_copy |
monkey-patch Element.copy to copy the rawsource and line for docutils-0.16 or older versions. |
Function | apply_source_workaround |
Undocumented |
Function | clean_astext |
Like node.astext(), but ignore images. |
Function | copy_source_info |
Undocumented |
Function | extract_messages |
Extract translatable messages from a document tree. |
Function | find_pending_xref_condition |
Pick matched pending_xref_condition node up from the pending_xref. |
Function | get_full_module_name |
Return full module dotted path like: 'docutils.nodes.paragraph' |
Function | get_node_line |
Undocumented |
Function | get_node_source |
Undocumented |
Function | get_prev_node |
Undocumented |
Function | inline_all_toctrees |
Inline all toctrees in the tree. |
Function | is_pending_meta |
Undocumented |
Function | is_smartquotable |
Check whether the node is smart-quotable or not. |
Function | is_translatable |
Undocumented |
Function | make_id |
Generate an appropriate node_id for given prefix and term. |
Function | make_refnode |
Shortcut to create a reference node. |
Function | nested_parse_with_titles |
Version of state.nested_parse() that allows titles and does not require titles to have the same decoration as the calling document. |
Function | process_index_entry |
Undocumented |
Function | process_only_nodes |
Filter only nodes which do not match tags. |
Function | repr_domxml |
return DOM XML representation of the specified node like: '<paragraph translatable="False"><inline classes="versionmodified">New in version...' |
Function | set_role_source_info |
Undocumented |
Function | set_source_info |
Undocumented |
Function | split_explicit_title |
Split role content into title and target, if given. |
Function | traverse_parent |
Undocumented |
Function | traverse_translatable_index |
Traverse translatable index node from a document tree. |
Variable | _non_id_at_ends |
Undocumented |
Variable | _non_id_chars |
Undocumented |
Variable | _non_id_translate |
Undocumented |
Variable | _non_id_translate_digraphs |
Undocumented |
Undocumented
Value |
|
Undocumented
Value |
|
Undocumented
Value |
|
Convert string
into an identifier and return it.
This function is a modified version of docutils.nodes.make_id() of docutils-0.16.
Changes:
# Author: David Goodger <goodger@python.org> # Maintainer: docutils-develop@lists.sourceforge.net # Copyright: This module has been placed in the public domain.
Parameters | |
string:str | Undocumented |
Returns | |
str | Undocumented |
monkey-patch Element.copy to copy the rawsource and line for docutils-0.16 or older versions.
refs: https://sourceforge.net/p/docutils/patches/165/
Returns | |
Element | Undocumented |
Parameters | |
node:Element | Undocumented |
Returns | |
str | Undocumented |
Undocumented
Parameters | |
src:Element | Undocumented |
dst:Element | Undocumented |
Parameters | |
doctree:Element | Undocumented |
Returns | |
Iterable[ | Undocumented |
Parameters | |
node:addnodes.pending_xref | Undocumented |
condition:str | Undocumented |
Returns | |
Optional[ | Undocumented |
Parameters | |
node:Node | Undocumented |
nodes.Node node | target node |
Returns | |
str | full module dotted path |
Undocumented
Parameters | |
node:Element | Undocumented |
Returns | |
Optional[ | Undocumented |
Undocumented
Parameters | |
node:Element | Undocumented |
Returns | |
Optional[ | Undocumented |
Undocumented
Parameters | |
node:Node | Undocumented |
Returns | |
Optional[ | Undocumented |
Inline all toctrees in the tree.
Record all docnames in docnameset, and output docnames with colorfunc.
Parameters | |
builder:Builder | Undocumented |
docnameset:Set[ | Undocumented |
docname:str | Undocumented |
tree:nodes.document | Undocumented |
colorfunc:Callable | Undocumented |
traversed:List[ | Undocumented |
Returns | |
nodes.document | Undocumented |
Parameters | |
node:Node | Undocumented |
Returns | |
bool | Undocumented |
Parameters | |
env:BuildEnvironment | Undocumented |
document:nodes.document | Undocumented |
prefix:str | Undocumented |
term:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
builder:Builder | Undocumented |
fromdocname:str | Undocumented |
todocname:str | Undocumented |
targetid:str | Undocumented |
child:Union[ | Undocumented |
title:str | Undocumented |
Returns | |
nodes.reference | Undocumented |
Version of state.nested_parse() that allows titles and does not require titles to have the same decoration as the calling document.
This is useful when the parsed content comes from a completely different context, such as docstrings.
Parameters | |
state:Any | Undocumented |
content:StringList | Undocumented |
node:Node | Undocumented |
Returns | |
str | Undocumented |
Undocumented
Parameters | |
entry:str | Undocumented |
targetid:str | Undocumented |
Returns | |
List[ | Undocumented |
Parameters | |
document:Node | Undocumented |
tags:Tags | Undocumented |
Parameters | |
node:Node | Undocumented |
length:int | Undocumented |
nodes.Node node | target node |
int length | length of return value to be striped. if false-value is specified, repr_domxml returns full of DOM XML representation. |
Returns | |
str | DOM XML representation |
Undocumented
Parameters | |
inliner:Inliner | Undocumented |
lineno:int | Undocumented |
node:Node | Undocumented |
Undocumented
Parameters | |
directive:Directive | Undocumented |
node:Node | Undocumented |
Parameters | |
text:str | Undocumented |
Returns | |
Tuple[ | Undocumented |
Undocumented
Parameters | |
node:Element | Undocumented |
cls:Any | Undocumented |
Returns | |
Iterable[ | Undocumented |