htmlParse

package
v0.0.0-...-9027ad8 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertCssColorToHex

func ConvertCssColorToHex(cssColor string) (color.Color, error)

func ParseHtml

func ParseHtml(path string) (string, error)

Types

type HtmlPage

type HtmlPage struct {
	Title string
	Type  PageType
	Body  []RenderedText
}

func (*HtmlPage) BuildText

func (hp *HtmlPage) BuildText(n *html.Node, inPreCode bool, currentIndex *int)

func (*HtmlPage) ConvertHTMLToText

func (hp *HtmlPage) ConvertHTMLToText(htmlNode *html.Node)

type PageType

type PageType string
const (
	BodyMatter PageType = "bodymatter"
	TitlePage  PageType = "titlepage"
)

type RenderedText

type RenderedText struct {
	Text *strings.Builder
	Tag  string
}

Jump to

Keyboard shortcuts

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