Merge pull request #274 from Ambrevar/v2misc

v2: Implicit interface and Stringer
This commit is contained in:
Vytautas Šaltenis 2016-07-27 09:39:58 +03:00 committed by GitHub
commit 89653c9927
2 changed files with 5 additions and 1 deletions

View File

@ -107,7 +107,7 @@ const (
// NewHTMLRenderer creates and configures an HTMLRenderer object, which
// satisfies the Renderer interface.
func NewHTMLRenderer(params HTMLRendererParameters) Renderer {
func NewHTMLRenderer(params HTMLRendererParameters) *HTMLRenderer {
// configure the rendering engine
closeTag := htmlClose
if params.Flags&UseXHTML != 0 {

View File

@ -310,6 +310,10 @@ func (nw *NodeWalker) resumeAt(node *Node, entering bool) (*Node, bool) {
return nw.next()
}
func (ast *Node) String() string {
return dumpString(ast)
}
func dump(ast *Node) {
fmt.Println(dumpString(ast))
}