PrevNamedSibling returns the previous named sibling in the tree
()
| 159 | |
| 160 | // PrevNamedSibling returns the previous named sibling in the tree |
| 161 | func (n *Node) PrevNamedSibling() *Node { |
| 162 | if !n.IsValid() { |
| 163 | return nil |
| 164 | } |
| 165 | return NewNode(n.node.PrevNamedSibling(), n.source) |
| 166 | } |
| 167 | |
| 168 | // CollapsedString takes a node representing a URL and attempts to make it |
| 169 | // at least somewhat easily parseable. It's common to build URLs out |