domutils

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListEndCommentData = "THE END"

Functions

func AddListEndComments

func AddListEndComments(ctx context.Context, doc *html.Node)

func AddSpace

func AddSpace(ctx context.Context, doc *html.Node, isOuterNode, isInnerNode func(*html.Node) bool)

func LeafBlockAlternatives

func LeafBlockAlternatives(ctx context.Context, doc *html.Node)

func MergeAdjacent

func MergeAdjacent(doc *html.Node, matchFn func(*html.Node) bool)

func MergeAdjacentTextNodes

func MergeAdjacentTextNodes(n *html.Node)

func MoveListItems added in v2.2.2

func MoveListItems(ctx context.Context, n *html.Node)

MoveListItems moves non-"li" nodes into the previous "li" nodes.

func RemoveEmptyCode

func RemoveEmptyCode(ctx context.Context, doc *html.Node)

func RemoveRedundant

func RemoveRedundant(doc *html.Node, matchFn func(*html.Node, *html.Node) bool)

func RenameFakeSpans

func RenameFakeSpans(ctx context.Context, doc *html.Node)

RenameFakeSpans renames all "span" nodes to "div" if any block element is found as a child.

func SwapTags

func SwapTags(ctx context.Context, doc *html.Node, isOuterNode, isInnerNode func(*html.Node) bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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