markdown

package
v0.0.0-...-ac0eb7d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func FirstParagraphText

func FirstParagraphText(body []byte, doc ast.Node) string

FirstParagraphText returns the plain text of the first paragraph in a document. If there's anything but headings or html comments before such a paragraph, it returns an empty string.

func WordCountAtLeast

func WordCountAtLeast(text []byte, want int) bool

Types

type HeadingInfo

type HeadingInfo struct {
	Text, Slug string
	Level      int
}

func AssignHeaderIDs

func AssignHeaderIDs(body []byte, doc ast.Node) ([]HeadingInfo, error)

Jump to

Keyboard shortcuts

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