added link target

This commit is contained in:
ston1th 2017-03-08 23:20:26 +01:00
commit 5bb294e63f

View file

@ -33,6 +33,7 @@ func render(text string) Article {
html = reHeader.ReplaceAllString(html, `${1} id="${2}">${2}${3}`)
html = reLink.ReplaceAllStringFunc(html, makeLinkTitle)
html = strings.Replace(html, "</h1>", `</h1><hr>`, -1)
html = strings.Replace(html, "<a", `<a target="_blank"`, -1)
return Article{
Search: whiteSpace.ReplaceAllString(string(filter.Filter(rend)), " "),
Index: template.HTML(index),