all repos — grayfriday @ 2f1f0b6b9f5dc8f9a9f5b9ba80553d01a204ac71

blackfriday fork with a few changes

Add RenderNode to Renderer interface
Vytautas Ĺ altenis vytas@rtfb.lt
Tue, 05 Jul 2016 07:32:16 +0300
commit

2f1f0b6b9f5dc8f9a9f5b9ba80553d01a204ac71

parent

cb6bd67271ff06ab8a866906fdf91f82e5b9df33

2 files changed, 13 insertions(+), 2 deletions(-)

jump to
M latex.golatex.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.gomarkdown.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