MCPcopy
hub / github.com/vinta/awesome-python / _find_link_deep

Function _find_link_deep

website/readme_parser.py:366–374  ·  view source on GitHub ↗

Find the first link anywhere in the subtree (including nested in strong/em).

(node: SyntaxTreeNode)

Source from the content-addressed store, hash-verified

364
365
366def _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
377def _parse_sponsor_item(inline: SyntaxTreeNode) -> ParsedSponsor | None:

Callers 1

_parse_sponsor_itemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected