Skip to content

Commit

Permalink
Merge pull request #6 from stof/emoji_15_1
Browse files Browse the repository at this point in the history
Update to Emoji 15.1
  • Loading branch information
stof authored Oct 20, 2023
2 parents 21e5db9 + 8b9f73f commit 38d0a97
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 7 deletions.
8 changes: 2 additions & 6 deletions bin/generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@
$sequencePatterns = parseFile($responses['emoji-sequences.txt']->getContent());
$zeroWidthJoinerSequencePatterns = parseFile($responses['emoji-zwj-sequences.txt']->getContent());

$emojiSequencesFinalUrl = $responses['emoji-sequences.txt']->getInfo('url');

assert(is_string($emojiSequencesFinalUrl));

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

$emojiVersion = $match[1];
Expand Down
Loading

0 comments on commit 38d0a97

Please sign in to comment.