Module for splitting docstring into Section groups.
Handsdown API Index / Handsdown / Processors / SectionMap
Auto-generated documentation for handsdown.processors.section_map module.
Show source in section_map.py:9
Dict-based storage for parsed Section list.
Used for BaseDocstringProcessor.
Key is a Section title.
Value is a related Section instance.
class SectionMap:
def __init__(self) -> None: ...Show source in section_map.py:97
Iterate over existing Section objects.
Section objects in order of appearance.
def __iter__(self) -> Iterator[Section]: ...Show source in section_map.py:65
Add new SectionBlock to section section_name.
If Section does not exist - it is not created.
section_name- Target section title
def add_block(self, section_name: str) -> None: ...Show source in section_map.py:41
Add new line to the last SectionBlock of section section_name.
If line and section are empty - section is not created.
section_name- Target section titleline- Line to add
def add_line(self, section_name: str, line: str) -> None: ...Show source in section_map.py:24
Add line respecting indent of the current section block.
section_name- Target section titleline- Line to add
def add_line_indent(self, section_name: str, line: str) -> None: ...Show source in section_map.py:80
Delete last empty lines from the last SectionBlock.
If Section does not exist - it is not created.
section_name- Target section title.
def trim_block(self, section_name: str) -> None: ...