GitHubJupyter
  • Preparing search index...
  • The search index is not available
@jupyterlab
  • @jupyterlab
  • toc
  • TableOfContentsUtils
  • Markdown
  • parseHeadings

Function parseHeadings

  • parseHeadings(
        markdownText: string,
        parser: null | IMarkdownParser,
    ): Promise<IMarkdownHeading[]>
  • Parses the provided string and returns a list of headings.

    Parameters

    • markdownText: string
    • parser: null | IMarkdownParser

      A Markdown parser instance used to render the content to HTML.

    Returns Promise<IMarkdownHeading[]>

    List of headings

    Remarks

    Renders Markdown to HTML and extracts <h1>–<h6> elements. Returns an empty list if the parser is null.

    • Defined in packages/toc/src/utils/markdown.ts:77

Settings

Member Visibility
GitHubJupyter
@jupyterlab
  • Loading...

Generated using TypeDoc