Skip to content

Commit e70a2b7

Browse files
authored
Expand regex for transport and map symbols (#26)
1 parent 4531979 commit e70a2b7

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/LitEmoji.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class LitEmoji
1212
| \xF0\x9F[\x8C-\x97][\x80-\xBF] # Misc
1313
| \xF0\x9F\x98[\x80-\xBF] # Smilies
1414
| \xF0\x9F\x99[\x80-\x8F]
15-
| \xF0\x9F\x9A[\x80-\xBF] # Transport and map symbols
15+
| \xF0\x9F[\x9A-\x9B][\x80-\xBF] # Transport and map symbols
1616
| \xF0\x9F[\xA4-\xA7][\x80-\xBF] # Supplementary symbols and pictographs
1717
)/x';
1818

tests/LitEmojiTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,10 @@ public function testConfigExcludeShortcodes()
5353
LitEmoji::config('excludeShortcodes', ['mobile', 'android', 'mobile_phone']);
5454
$this->assertEquals(':iphone:', LitEmoji::encodeShortcode('📱'));
5555
}
56+
57+
public function testIssue25()
58+
{
59+
$text = LitEmoji::encodeShortcode('🚀🛒');
60+
$this->assertEquals(':rocket::shopping_trolley:', $text);
61+
}
5662
}

0 commit comments

Comments
 (0)