Skip to content

Commit 38d0a97

Browse files
authored
Merge pull request #6 from stof/emoji_15_1
Update to Emoji 15.1
2 parents 21e5db9 + 8b9f73f commit 38d0a97

File tree

2 files changed

+121
-7
lines changed

2 files changed

+121
-7
lines changed

bin/generate.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@
3030
$sequencePatterns = parseFile($responses['emoji-sequences.txt']->getContent());
3131
$zeroWidthJoinerSequencePatterns = parseFile($responses['emoji-zwj-sequences.txt']->getContent());
3232

33-
$emojiSequencesFinalUrl = $responses['emoji-sequences.txt']->getInfo('url');
34-
35-
assert(is_string($emojiSequencesFinalUrl));
36-
37-
if (!preg_match('#https://www\.unicode.org/Public/emoji/([^/]++)/emoji-sequences\.txt#', $emojiSequencesFinalUrl, $match)) {
38-
throw new RuntimeException('Cannot extract the Emoji version from the URL: '.$responses['emoji-sequences.txt']->getInfo('url'));
33+
if (!preg_match('/# Version: ([\d.]+)/', $responses['emoji-sequences.txt']->getContent(), $match)) {
34+
throw new RuntimeException('Cannot extract the Emoji version from the file emoji-sequences.txt');
3935
}
4036

4137
$emojiVersion = $match[1];

0 commit comments

Comments
 (0)