contentdiff

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diffs

type Diffs struct {
	Text       []TextDiff `json:"text"`
	Multimedia []TextDiff `json:"multimedia"`
	Link       []LinkDiff `json:"link"`
}

func DiffHTML

func DiffHTML(r1, r2 io.Reader) (*Diffs, error)

type HTMLContent

type HTMLContent struct {
	Links      []Link   `json:"links"`
	Multimedia []string `json:"multimedia"`
	Text       string   `json:"text"`
}

func ExtractHTMLContent

func ExtractHTMLContent(r io.Reader) *HTMLContent
type Link struct {
	Href string `json:"href"`
	Text string `json:"text"`
}

type LinkDiff

type LinkDiff struct {
	Link Link   `json:"link"`
	Type string `json:"type"`
}
func DiffLink(l1, l2 []Link) []LinkDiff

type TextDiff

type TextDiff struct {
	Text string `json:"text"`
	Type string `json:"type"`
}

func DiffList

func DiffList(l1, l2 []string) []TextDiff

func DiffText

func DiffText(t1, t2 string) []TextDiff

Jump to

Keyboard shortcuts

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