Add RenderNode to Renderer interface
Vytautas Ĺ altenis vytas@rtfb.lt
Tue, 05 Jul 2016 07:32:16 +0300
2 files changed,
13 insertions(+),
2 deletions(-)
M
latex.go
→
latex.go
@@ -15,7 +15,10 @@ //
package blackfriday -import "bytes" +import ( + "bytes" + "io" +) // Latex is a type that implements the Renderer interface for LaTeX output. //@@ -323,5 +326,11 @@ r.w.WriteString("\n\\end{document}\n")
} func (r *Latex) Render(ast *Node) []byte { + // TODO return nil } + +func (r *Latex) RenderNode(w io.Writer, node *Node, entering bool) WalkStatus { + // TODO + return GoToNext +}
M
markdown.go
→
markdown.go
@@ -21,6 +21,7 @@
import ( "bytes" "fmt" + "io" "strings" "unicode/utf8" )@@ -168,9 +169,10 @@ // respective element directly to the output buffer and return true on success.
// If the callback returns false, the rendering function should reset the // output buffer as though it had never been called. // -// Currently Html and Latex implementations are provided +// Currently HTML and Latex implementations are provided type Renderer interface { Render(ast *Node) []byte + RenderNode(w io.Writer, node *Node, entering bool) WalkStatus } // Callback functions for inline parsing. One such function is defined