Find the first link anywhere in the subtree (including nested in strong/em).
(node: SyntaxTreeNode)
| 364 | |
| 365 | |
| 366 | def _find_link_deep(node: SyntaxTreeNode) -> SyntaxTreeNode | None: |
| 367 | """Find the first link anywhere in the subtree (including nested in strong/em).""" |
| 368 | for child in node.children: |
| 369 | if child.type == "link": |
| 370 | return child |
| 371 | found = _find_link_deep(child) |
| 372 | if found: |
| 373 | return found |
| 374 | return None |
| 375 | |
| 376 | |
| 377 | def _parse_sponsor_item(inline: SyntaxTreeNode) -> ParsedSponsor | None: |
no outgoing calls
no test coverage detected