mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
Remove dead HTMLWriter code
This commit is contained in:
parent
f90a576a05
commit
cb6bd67271
13
html.go
13
html.go
|
@ -102,7 +102,6 @@ type HTMLRenderer struct {
|
|||
// Track header IDs to prevent ID collision in a single generation.
|
||||
headerIDs map[string]int
|
||||
|
||||
w HTMLWriter
|
||||
lastOutputLen int
|
||||
disableTags int
|
||||
}
|
||||
|
@ -112,16 +111,6 @@ const (
|
|||
htmlClose = ">"
|
||||
)
|
||||
|
||||
type HTMLWriter struct {
|
||||
bytes.Buffer
|
||||
}
|
||||
|
||||
// Writes out a newline if the output is not pristine. Used at the beginning of
|
||||
// every rendering func
|
||||
func (w *HTMLWriter) Newline() {
|
||||
w.WriteByte('\n')
|
||||
}
|
||||
|
||||
// NewHTMLRenderer creates and configures an HTMLRenderer object, which
|
||||
// satisfies the Renderer interface.
|
||||
func NewHTMLRenderer(params HTMLRendererParameters) Renderer {
|
||||
|
@ -135,13 +124,11 @@ func NewHTMLRenderer(params HTMLRendererParameters) Renderer {
|
|||
params.FootnoteReturnLinkContents = `<sup>[return]</sup>`
|
||||
}
|
||||
|
||||
var writer HTMLWriter
|
||||
return &HTMLRenderer{
|
||||
HTMLRendererParameters: params,
|
||||
|
||||
closeTag: closeTag,
|
||||
headerIDs: make(map[string]int),
|
||||
w: writer,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4
latex.go
4
latex.go
|
@ -21,7 +21,7 @@ import "bytes"
|
|||
//
|
||||
// Do not create this directly, instead use the NewLatexRenderer function.
|
||||
type Latex struct {
|
||||
w HTMLWriter
|
||||
w bytes.Buffer
|
||||
}
|
||||
|
||||
// NewLatexRenderer creates and configures a Latex object, which
|
||||
|
@ -30,7 +30,7 @@ type Latex struct {
|
|||
// flags is a set of LATEX_* options ORed together (currently no such options
|
||||
// are defined).
|
||||
func NewLatexRenderer(flags int) Renderer {
|
||||
var writer HTMLWriter
|
||||
var writer bytes.Buffer
|
||||
return &Latex{
|
||||
w: writer,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user