Skip to content

Commit

Permalink
Expand regex for transport and map symbols (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmcrae authored Oct 5, 2021
1 parent 4531979 commit e70a2b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/LitEmoji.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LitEmoji
| \xF0\x9F[\x8C-\x97][\x80-\xBF] # Misc
| \xF0\x9F\x98[\x80-\xBF] # Smilies
| \xF0\x9F\x99[\x80-\x8F]
| \xF0\x9F\x9A[\x80-\xBF] # Transport and map symbols
| \xF0\x9F[\x9A-\x9B][\x80-\xBF] # Transport and map symbols
| \xF0\x9F[\xA4-\xA7][\x80-\xBF] # Supplementary symbols and pictographs
)/x';

Expand Down
6 changes: 6 additions & 0 deletions tests/LitEmojiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,10 @@ public function testConfigExcludeShortcodes()
LitEmoji::config('excludeShortcodes', ['mobile', 'android', 'mobile_phone']);
$this->assertEquals(':iphone:', LitEmoji::encodeShortcode('📱'));
}

public function testIssue25()
{
$text = LitEmoji::encodeShortcode('🚀🛒');
$this->assertEquals(':rocket::shopping_trolley:', $text);
}
}

0 comments on commit e70a2b7

Please # to comment.