markup

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Overview

Package markup implements functions for extracting info from HTML and XML documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAnAttribute

func GetAnAttribute(s *scan.Bytes) (name, val []byte, hasMore bool)

GetAnAttribute assumes we passed over an SGML tag and extracts first attribute and its value.

Initially, this code existed inside charset/charset.go, because it was part of implementing the https://html.spec.whatwg.org/multipage/parsing.html#prescan-a-byte-stream-to-determine-its-encoding algorithm. But because extracting an attribute from a tag is the same for both HTML and XML, then the code was moved here.

func SkipAComment added in v0.20.0

func SkipAComment(s *scan.Bytes) (skipped bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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