all repos — grayfriday @ cb6bd67271ff06ab8a866906fdf91f82e5b9df33

blackfriday fork with a few changes

Remove dead HTMLWriter code
Vytautas Ĺ altenis vytas@rtfb.lt
Mon, 04 Jul 2016 22:02:22 +0300
commit

cb6bd67271ff06ab8a866906fdf91f82e5b9df33

parent

f90a576a05b8a97dd6e2936e613eadb48c57112a

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

jump to
M html.gohtml.go

@@ -102,7 +102,6 @@

// 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 @@ xhtmlClose = " />"

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 @@ if params.FootnoteReturnLinkContents == "" {

params.FootnoteReturnLinkContents = `<sup>[return]</sup>` } - var writer HTMLWriter return &HTMLRenderer{ HTMLRendererParameters: params, closeTag: closeTag, headerIDs: make(map[string]int), - w: writer, } }
M latex.golatex.go

@@ -21,7 +21,7 @@ // Latex is a type that implements the Renderer interface for LaTeX output.

// // 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 @@ //

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