Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HtmlElement ¶
type HtmlElement struct { StartToken html.Token EndToken html.Token Children []*HtmlElement SelfClosed bool }
HtmlElement html节点树
func NewHtmlElement ¶
func NewHtmlElement(start html.Token) *HtmlElement
NewHtmlElement 根据startTagToken生成html node
func (*HtmlElement) AddChild ¶
func (element *HtmlElement) AddChild(child *HtmlElement)
func (*HtmlElement) NeedNewLine ¶
func (element *HtmlElement) NeedNewLine() bool
NeedNewLine 如果一个node不管是否有子节点都需要换行,返回true
Click to show internal directories.
Click to hide internal directories.