parent
16034bb613
commit
d4f28fd4ad
2 changed files with 2 additions and 2 deletions
|
@ -484,7 +484,7 @@ func createCustomEmoji(alias, class string) *html.Node {
|
||||||
}
|
}
|
||||||
if class != "" {
|
if class != "" {
|
||||||
img.Attr = append(img.Attr, html.Attribute{Key: "alt", Val: fmt.Sprintf(`:%s:`, alias)})
|
img.Attr = append(img.Attr, html.Attribute{Key: "alt", Val: fmt.Sprintf(`:%s:`, alias)})
|
||||||
img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/img/emoji/%s.png`, setting.StaticURLPrefix, alias)})
|
img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/assets/img/emoji/%s.png`, setting.StaticURLPrefix, alias)})
|
||||||
}
|
}
|
||||||
|
|
||||||
span.AppendChild(img)
|
span.AppendChild(img)
|
||||||
|
|
|
@ -283,7 +283,7 @@ func TestRender_emoji(t *testing.T) {
|
||||||
//Text that should be turned into or recognized as emoji
|
//Text that should be turned into or recognized as emoji
|
||||||
test(
|
test(
|
||||||
":gitea:",
|
":gitea:",
|
||||||
`<p><span class="emoji" aria-label="gitea"><img alt=":gitea:" src="`+setting.StaticURLPrefix+`/img/emoji/gitea.png"/></span></p>`)
|
`<p><span class="emoji" aria-label="gitea"><img alt=":gitea:" src="`+setting.StaticURLPrefix+`/assets/img/emoji/gitea.png"/></span></p>`)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"Some text with 😄 in the middle",
|
"Some text with 😄 in the middle",
|
||||||
|
|
Loading…
Reference in a new issue