all repos — grayfriday @ 413328d30b1d3038f1ef0c1794003997639907d2

blackfriday fork with a few changes

Add Icon parameter to the HTML renderer
Pierre Neidhardt ambrevar@gmail.com
Tue, 09 Aug 2016 17:54:34 +0530
commit

413328d30b1d3038f1ef0c1794003997639907d2

parent

0f3eafddfa07d57c2d0fd289a9d6520a0f766220

1 files changed, 8 insertions(+), 0 deletions(-)

jump to
M html.gohtml.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")