This commit is contained in:
parent
c5a53c79da
commit
f5a423f2d5
1 changed files with 1 additions and 1 deletions
|
|
@ -152,7 +152,7 @@ var funcMap = template.FuncMap{
|
||||||
return body
|
return body
|
||||||
}
|
}
|
||||||
text := html2text.HTML2TextWithOptions(buf.String(), html2text.WithLinksInnerText())
|
text := html2text.HTML2TextWithOptions(buf.String(), html2text.WithLinksInnerText())
|
||||||
re := regexp.MustCompile(`\<https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\>`)
|
re := regexp.MustCompile(`\<(https?:\/\/|mailto)(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\>`)
|
||||||
return re.ReplaceAllString(text, "")
|
return re.ReplaceAllString(text, "")
|
||||||
},
|
},
|
||||||
"contains": strings.Contains,
|
"contains": strings.Contains,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue