Documentation ¶
Overview ¶
Package parsehtml provides utilities for parsing HTML-format library documentation, which is referenced for type information by the Python "compile" check.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InBetween ¶
InBetween returns the portion of string `s` appearing after the first occurrence of substring `before` (exclusive), assuming it exists, and before the first occurrence of substring `after` (exclusive), if it exists.
func NodeIsAll ¶
NodeIsAll returns the logical conjunction ("and") of the given predicate functions of HTML nodes.
Types ¶
type Attribute ¶
Attribute wraps html.Attribute so we can define additional convenience methods
func (Attribute) AttributeIsMember ¶
AttributeIsMember returns true if the given slice of HTML attributes contains the given attribute, otherwise false.
func (Attribute) IsAttribute ¶
IsAttribute returns true if the given HTML node has the given attribute, otherwise false.
type Node ¶
Node wraps html.Node so we can define additional convenience methods
func (Node) FindChildNode ¶
FindChildNode returns the first HTML child node of the given node that satisfies the given predicate function if one exists, otherwise nil.
func (Node) FindNextNode ¶
FindNextNode returns the next HTML sibling node of the given node that satisfies the given predicate function if one exists, otherwise nil.
func (Node) FindNode ¶
FindNode returns the next HTML sibling node, beginning with `node` itself, that satisfies the given predicate function if one exists, otherwise nil.
func (Node) OnEachChildNode ¶
OnEachChildNode executes the given process function on each HTML child node of the given node satisfying the given predicate function, stopping if an error occurs.
type NodeP ¶
NodeP represents a boolean predicate function on HTML nodes.
func HasClass ¶
HasClass returns a NodeP function that returns true if the HTML node it is passed has a class attribute with the value of the given name, otherwise false.
func HasElementName ¶
HasElementName returns a NodeP function that returns true if the HTML node it is passed is an element node with the given name, otherwise false.