inspecthtml

package
v0.0.0-...-41b4395 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2025 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeAttributeMetadata

type NodeAttributeMetadata struct {
	KeyOffsets   cursorio.TextOffsetRange
	ValueOffsets *cursorio.TextOffsetRange
}

type NodeMetadata

type NodeMetadata struct {
	TokenOffsets cursorio.TextOffsetRange

	TagNameOffsets *cursorio.TextOffsetRange
	TagAttr        []*NodeAttributeMetadata
	TagSelfClosing bool

	EndTagTokenOffsets *cursorio.TextOffsetRange
}

func (NodeMetadata) GetInnerOffsets

func (n NodeMetadata) GetInnerOffsets() cursorio.TextOffsetRange

func (NodeMetadata) GetOuterOffsets

func (n NodeMetadata) GetOuterOffsets() cursorio.TextOffsetRange

func (NodeMetadata) HasInner

func (n NodeMetadata) HasInner() bool

type ParseMetadata

type ParseMetadata struct {
	// contains filtered or unexported fields
}

func Parse

func Parse(r io.Reader) (*html.Node, *ParseMetadata, error)

func ParseWithOptions

func ParseWithOptions(r io.Reader, opts ...html.ParseOption) (*html.Node, *ParseMetadata, error)

func (*ParseMetadata) GetNodeMetadata

func (po *ParseMetadata) GetNodeMetadata(n *html.Node) (*NodeMetadata, bool)

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(r io.Reader, opts ...ParserOption) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (*html.Node, *ParseMetadata, error)

func (*Parser) ParseWithOptions

func (p *Parser) ParseWithOptions(opts ...html.ParseOption) (*html.Node, *ParseMetadata, error)

type ParserConfig

type ParserConfig struct {
	// contains filtered or unexported fields
}

func (ParserConfig) SetInitialOffset

func (c ParserConfig) SetInitialOffset(v cursorio.TextOffset) ParserConfig

func (ParserConfig) SetReaderInterceptor

func (c ParserConfig) SetReaderInterceptor(f func(r io.Reader) io.Reader) ParserConfig

func (ParserConfig) SetTokenizerInterceptor

func (c ParserConfig) SetTokenizerInterceptor(f func(t *html.Tokenizer) *html.Tokenizer) ParserConfig

type ParserOption

type ParserOption interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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