break down and make mentions look like other mentions
Ted Unangst tedu@tedunangst.com
Tue, 16 Apr 2019 16:10:51 -0400
1 files changed,
3 insertions(+),
2 deletions(-)
jump to
M
fun.go
→
fun.go
@@ -185,8 +185,9 @@ where := gofish(m)
if where == "" { return m } - return fmt.Sprintf(`<a class="mention" href="%s">%s</a>`, html.EscapeString(where), - html.EscapeString(m)) + who := m[0:1 + strings.IndexByte(m[1:], '@')] + return fmt.Sprintf(`<span class="h-card"><a class="u-url mention" href="%s">%s</a></span>`, + html.EscapeString(where), html.EscapeString(who)) }) return s }