module documentation
Implements the low-level algorithms Sphinx uses for versioning doctrees.
Class |
|
Add UIDs to doctree for versioning. |
Function | add |
Add a unique id to every node in the `doctree` which matches the condition and yield the nodes. |
Function | get |
Return a "similarity ratio" (in percent) representing the similarity between the two strings where 0 is equal and anything above less than equal. |
Function | levenshtein |
Return the Levenshtein edit distance between two strings *a* and *b*. |
Function | merge |
Merge the `old` doctree with the `new` one while looking at nodes matching the `condition`. |
Function | setup |
Undocumented |
Constant | IS |
Undocumented |
Constant | VERSIONING |
Undocumented |
Add a unique id to every node in the `doctree` which matches the condition and yield the nodes. :param doctree: A :class:`docutils.nodes.document` instance. :param condition: A callable which returns either ``True`` or ``False`` for a given node.
Parameters | |
doctree:Node | Undocumented |
condition:Any | Undocumented |
Returns | |
Iterator[ | Undocumented |
Merge the `old` doctree with the `new` one while looking at nodes matching the `condition`. Each node which replaces another one or has been added to the `new` doctree will be yielded. :param condition: A callable which returns either ``True`` or ``False`` for a given node.
Parameters | |
old:Node | Undocumented |
new:Node | Undocumented |
condition:Any | Undocumented |
Returns | |
Iterator[ | Undocumented |