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

Function _parse_inline

website/tests/test_readme_parser.py:20–25  ·  view source on GitHub ↗

Helper: parse a single paragraph and return its inline children.

(md_text: str)

Source from the content-addressed store, hash-verified

18
19
20def _parse_inline(md_text: str) -> list[SyntaxTreeNode]:
21 """Helper: parse a single paragraph and return its inline children."""
22 md = MarkdownIt("commonmark")
23 root = SyntaxTreeNode(md.parse(md_text))
24 # root > paragraph > inline > children
25 return root.children[0].children[0].children
26
27
28class TestRenderInlineHtml:

Callers 10

test_link_with_targetMethod · 0.85
test_emphasisMethod · 0.85
test_strongMethod · 0.85
test_code_inlineMethod · 0.85
test_plain_textMethod · 0.85
test_code_inline_keptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected