MCPcopy
hub / github.com/mkdocs/mkdocs / get_markdown_toc

Function get_markdown_toc

mkdocs/tests/base.py:19–23  ·  view source on GitHub ↗

Return TOC generated by Markdown parser from Markdown source text.

(markdown_source)

Source from the content-addressed store, hash-verified

17
18
19def get_markdown_toc(markdown_source):
20 """Return TOC generated by Markdown parser from Markdown source text."""
21 md = markdown.Markdown(extensions=['toc'])
22 md.convert(markdown_source)
23 return md.toc_tokens
24
25
26def load_config(config_file_path: str | None = None, **cfg) -> MkDocsConfig:

Callers 13

test_find_toc_by_idMethod · 0.90
test_pageMethod · 0.90
test_indented_tocMethod · 0.90
test_flat_tocMethod · 0.90
test_flat_h2_tocMethod · 0.90
test_mixed_tocMethod · 0.90
test_mixed_htmlMethod · 0.90
test_nested_anchorMethod · 0.90
test_entityrefMethod · 0.90
test_charrefMethod · 0.90

Calls

no outgoing calls

Tested by 13

test_find_toc_by_idMethod · 0.72
test_pageMethod · 0.72
test_indented_tocMethod · 0.72
test_flat_tocMethod · 0.72
test_flat_h2_tocMethod · 0.72
test_mixed_tocMethod · 0.72
test_mixed_htmlMethod · 0.72
test_nested_anchorMethod · 0.72
test_entityrefMethod · 0.72
test_charrefMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…