mtoc

package
v0.0.0-...-94ee829 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderFromHTML

func RenderFromHTML(content string) (string, error)

RenderFromHTML extracts a structure from the given HTML content and renders a corresponding table of contents as an HTML string.

func RenderFromHTMLWithMaxLevel

func RenderFromHTMLWithMaxLevel(content string, maxLevel int) (string, error)

RenderFromHTMLWithMaxLevel extracts a structure from the given HTML content and renders a corresponding table of contents as an HTML string, but only considers headers of maxLevel or lower. For example, if maxLevel is 2, only h1s and h2s will be included.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL