@ -154,6 +154,7 @@ func NewFuncMap() []template.FuncMap {
"RenderCommitMessageLink" : RenderCommitMessageLink ,
"RenderCommitMessageLink" : RenderCommitMessageLink ,
"RenderCommitMessageLinkSubject" : RenderCommitMessageLinkSubject ,
"RenderCommitMessageLinkSubject" : RenderCommitMessageLinkSubject ,
"RenderCommitBody" : RenderCommitBody ,
"RenderCommitBody" : RenderCommitBody ,
"RenderIssueTitle" : RenderIssueTitle ,
"RenderEmoji" : RenderEmoji ,
"RenderEmoji" : RenderEmoji ,
"RenderEmojiPlain" : emoji . ReplaceAliases ,
"RenderEmojiPlain" : emoji . ReplaceAliases ,
"ReactionToEmoji" : ReactionToEmoji ,
"ReactionToEmoji" : ReactionToEmoji ,
@ -630,6 +631,16 @@ func RenderCommitBody(msg, urlPrefix string, metas map[string]string) template.H
return template . HTML ( renderedMessage )
return template . HTML ( renderedMessage )
}
}
// RenderIssueTitle renders issue/pull title with defined post processors
func RenderIssueTitle ( text , urlPrefix string , metas map [ string ] string ) template . HTML {
renderedText , err := markup . RenderIssueTitle ( [ ] byte ( template . HTMLEscapeString ( text ) ) , urlPrefix , metas )
if err != nil {
log . Error ( "RenderIssueTitle: %v" , err )
return template . HTML ( "" )
}
return template . HTML ( renderedText )
}
// RenderEmoji renders html text with emoji post processors
// RenderEmoji renders html text with emoji post processors
func RenderEmoji ( text string ) template . HTML {
func RenderEmoji ( text string ) template . HTML {
renderedText , err := markup . RenderEmoji ( [ ] byte ( template . HTMLEscapeString ( text ) ) )
renderedText , err := markup . RenderEmoji ( [ ] byte ( template . HTMLEscapeString ( text ) ) )