all repos — honk @ 72ffdf2ff08e16a4ad0e2735f3576929f49e627c

my fork of honk

twitmoji should just be unicode
Ted Unangst tedu@tedunangst.com
Fri, 11 Feb 2022 18:03:32 -0500
commit

72ffdf2ff08e16a4ad0e2735f3576929f49e627c

parent

1cdcf0570ab2ce9ec07863dd7670d1e7e42173e4

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M hoot.gohoot.go

@@ -53,6 +53,10 @@ }

var htf htfilter.Filter htf.Imager = func(node *html.Node) string { + alt := htfilter.GetAttr(node, "alt") + if htfilter.HasClass(node, "Emoji") && alt != "" { + return alt + } return fmt.Sprintf(" <img src='%s'>", htfilter.GetAttr(node, "src")) }