Remove dead HTMLWriter code

This commit is contained in:
Vytautas Šaltenis 2016-07-04 22:02:22 +03:00
parent f90a576a05
commit cb6bd67271
2 changed files with 2 additions and 15 deletions

13
html.go
View File

@ -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,
}
}

View File

@ -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,
}