Skip to main content

Module markdown

Module markdown 

Source
Expand description

Split Markdown, reStructuredText and plain text into heading-scoped sections small enough to rank and quote.

Structs§

Section

Functions§

clean_mdx
Blank out front matter (keeping its title), and for MDX the import / export lines and JSX-only lines. export const title = "..." names the page and export const description keeps its text. HTML headings (<h3 id="x"><a href="#x">@import</a></h3>, one or more lines) become Markdown headings so sections split at them. Line numbers are preserved.
generic_heading
Headings that name a part of a page, not a topic (Parameters, Returns, Examples): the topic is the heading above them.
metadata_body
The body of a Python METADATA file (after the RFC 822 headers), which is the package README.
split
topic_heading
The heading an entry is about: its last heading, or the one above it when the last is generic (generateMetadata › Parameters -> generateMetadata).