Add Icon parameter to the HTML renderer
Pierre Neidhardt ambrevar@gmail.com
Tue, 09 Aug 2016 17:54:34 +0530
1 files changed,
8 insertions(+),
0 deletions(-)
jump to
M
html.go
→
html.go
@@ -83,6 +83,7 @@ HeaderIDSuffix string
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@@ -737,6 +738,13 @@ w.WriteString(">\n")
if r.CSS != "" { w.WriteString(" <link rel=\"stylesheet\" type=\"text/css\" href=\"") w.Write(esc([]byte(r.CSS))) + w.WriteString("\"") + w.WriteString(ending) + w.WriteString(">\n") + } + if r.Icon != "" { + w.WriteString(" <link rel=\"icon\" type=\"image/x-icon\" href=\"") + w.Write(esc([]byte(r.Icon))) w.WriteString("\"") w.WriteString(ending) w.WriteString(">\n")