Return the numeric level for a heading node.
(node: SyntaxTreeNode)
| 115 | |
| 116 | |
| 117 | def _heading_level(node: SyntaxTreeNode) -> int | None: |
| 118 | """Return the numeric level for a heading node.""" |
| 119 | if node.type != "heading" or not node.tag.startswith("h"): |
| 120 | return None |
| 121 | return int(node.tag[1:]) |
| 122 | |
| 123 | |
| 124 | def _extract_description_children(nodes: list[SyntaxTreeNode]) -> list[SyntaxTreeNode]: |
no outgoing calls
no test coverage detected