all repos — grayfriday @ 37141d5b5abe595bc49582437df3c16cb336be19

blackfriday fork with a few changes

Merge pull request #296 from Ambrevar/v2icon

v2: Add Icon parameter to the HTML renderer
Vytautas Ĺ altenis vytas@rtfb.lt
Tue, 09 Aug 2016 22:22:31 +0300
commit

37141d5b5abe595bc49582437df3c16cb336be19

parent

c9f76b530b0b9f0c27cba7a8e67897b798d47b14

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")