Add RenderNode to Renderer interface
This commit is contained in:
parent
cb6bd67271
commit
2f1f0b6b9f
11
latex.go
11
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 @@ func (r *Latex) DocumentFooter() {
|
|||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ package blackfriday
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
@ -168,9 +169,10 @@ var blockTags = map[string]struct{}{
|
|||
// 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
|
||||
|
|
Loading…
Reference in New Issue