Merge pull request #6099 from annando/ap-emojis

Using CSS for custom emojis
This commit is contained in:
Hypolite Petovan 2018-11-08 06:54:05 -05:00 committed by GitHub
commit c464ec33e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -50,7 +50,8 @@ class Processor
public static function replaceEmojis($emojis, $body) public static function replaceEmojis($emojis, $body)
{ {
foreach ($emojis as $emoji) { foreach ($emojis as $emoji) {
$body = str_replace($emoji['name'], '[img=16x16]' . $emoji['href'] . '[/img]', $body); $replace = '[class=emoji mastodon][img=' . $emoji['href'] . ']' . $emoji['name'] . '[/img][/class]';
$body = str_replace($emoji['name'], $replace, $body);
} }
return $body; return $body;
} }

View File

@ -602,3 +602,8 @@ img.invalid-src:after { vertical-align: top;}
#register-explicid-content { #register-explicid-content {
font-weight: bold; font-weight: bold;
} }
span.emoji.mastodon img {
height: 1.2em;
vertical-align: middle;
}