]> cat aescling's git repositories - mastodon.git/commitdiff
Update _bio.html.haml (#8449)
authorTad Thorley <phaedryx@users.noreply.github.com>
Sun, 26 Aug 2018 12:33:59 +0000 (06:33 -0600)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 26 Aug 2018 12:33:59 +0000 (14:33 +0200)
On my local instance (https://ruby.social) we have a custom emoji for octocat (:octocat:). I would love to be able to use the emoji in the metadata for my profile. Instead of:

| github | https://github.com/phaedryx

It could be:

| :octocat: | https://github.com/phaedryx

(using a single emoji makes it easier to read the urls)

app/views/accounts/_bio.html.haml

index c9a4d8f1b5589c0b49f2e35f6372aa553bfddd74..4e674beff15a20e3a84af9386eeed7d471fd42e3 100644 (file)
@@ -3,7 +3,7 @@
     .account__header__fields
       - account.fields.each do |field|
         %dl
-          %dt.emojify{ title: field.name }= field.name
+          %dt.emojify{ title: field.name }= Formatter.instance.format_field(account, field.name, custom_emojify: true)
           %dd.emojify{ title: field.value }= Formatter.instance.format_field(account, field.value, custom_emojify: true)
 
   = account_badge(account)