anchor

package
v0.0.0-...-9b8ebee Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: CC0-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anchor

type Anchor struct {
	ID          string `json:"id"`    // Id of the h* element.
	Value       string `json:"value"` // Value inside the anchor tag.
	HeaderLevel int    `json:"level"` // Level of the h* element.
}

Anchor is a html anchor tag with an id attribute and a value. Represents: <a id="Id">Value</a> It is intended to link to titles in the document

func Anchors

func Anchors(body string) (anchs []Anchor, err error)

Anchors finds <h*> elements inside a HTML string to create a list of anchors.

Jump to

Keyboard shortcuts

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