From 413328d30b1d3038f1ef0c1794003997639907d2 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 9 Aug 2016 17:54:34 +0530 Subject: [PATCH] Add Icon parameter to the HTML renderer --- html.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/html.go b/html.go index 740100c..a1f2c0c 100644 --- a/html.go +++ b/html.go @@ -83,6 +83,7 @@ type HTMLRendererParameters struct { Title string // Document title (used if CompletePage is set) CSS string // Optional CSS file URL (used if CompletePage is set) + Icon string // Optional icon file URL (used if CompletePage is set) Flags HTMLFlags // Flags allow customizing this renderer's behavior Extensions Extensions // Extensions give Smartypants and HTML renderer access to Blackfriday's global extensions @@ -741,6 +742,13 @@ func (r *HTMLRenderer) writeDocumentHeader(w *bytes.Buffer, sr *SPRenderer) { w.WriteString(ending) w.WriteString(">\n") } + if r.Icon != "" { + w.WriteString(" \n") + } w.WriteString("\n") w.WriteString("\n\n") }