Skip to content

Commit d1ea6cc

Browse files
committed
Update regex for Emoji 13.0
1 parent f5dfa9e commit d1ea6cc

File tree

5 files changed

+64
-7
lines changed

5 files changed

+64
-7
lines changed

‎BUILD‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
node_module(
2-
sources = rglobs(
2+
sources = [
33
".babelrc",
44
".eslintignore",
55
".eslintrc",
66
".flowconfig",
7-
"scripts/*",
8-
"src/*",
97
"jest.config.js",
108
"package.json",
9+
"scripts/**/*",
10+
"src/**/*",
1111
"yarn.lock",
12-
),
12+
],
1313
package_manager = "yarn",
1414
)
1515

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ in all interactions with the community.
5151
Create a [new issue](https://github.com/twitter/twemoji-parser/issues/new) on GitHub.
5252

5353
## Security Issues?
54-
Please report sensitive security issues via Twitter's [bug-bounty program](https://hackerone.com/twitter) rather than GitHub.
54+
Please report sensitive security issues via Twitter's bug-bounty program (https://hackerone.com/twitter) rather than GitHub.
5555

5656
## License
5757

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"license": "MIT",
33
"name": "twemoji-parser",
4-
"version": "12.1.3",
4+
"version": "13.0.0",
55
"description": "Parser for identifying Twemoji in text",
66
"main": "dist/index.js",
77
"files": [

‎src/__tests__/index.test.js‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ describe('version spot checks', () => {
598598
}
599599
]);
600600
});
601+
601602
describe('trans symbol', () => {
602603
test('with vs16', () => {
603604
expect(parse('\u26a7\ufe0f')).toMatchObject([
@@ -652,4 +653,60 @@ describe('version spot checks', () => {
652653
}
653654
});
654655
});
656+
657+
describe('Emoji 13.0', () => {
658+
test('Mx Claus', () => {
659+
expect(parse('\ud83e\uddd1\u200d\ud83c\udf84')).toMatchObject([
660+
{
661+
indices: [0, 5],
662+
text: '\ud83e\uddd1\u200d\ud83c\udf84'
663+
}
664+
]);
665+
});
666+
667+
test('black cat', () => {
668+
expect(parse('\ud83d\udc08\u200d\u2b1b')).toMatchObject([
669+
{
670+
indices: [0, 4],
671+
text: '\ud83d\udc08\u200d\u2b1b'
672+
}
673+
]);
674+
});
675+
676+
test('polar bear', () => {
677+
expect(parse('\ud83d\udc3b\u200d\u2744\ufe0f')).toMatchObject([
678+
{
679+
indices: [0, 5],
680+
text: '\ud83d\udc3b\u200d\u2744\ufe0f'
681+
}
682+
]);
683+
});
684+
685+
test('woman feeding baby', () => {
686+
expect(parse('\ud83d\udc69\u200d\ud83c\udf7c')).toMatchObject([
687+
{
688+
indices: [0, 5],
689+
text: '\ud83d\udc69\u200d\ud83c\udf7c'
690+
}
691+
]);
692+
});
693+
694+
test('man feeding baby', () => {
695+
expect(parse('\ud83d\udc68\u200d\ud83c\udf7c')).toMatchObject([
696+
{
697+
indices: [0, 5],
698+
text: '\ud83d\udc68\u200d\ud83c\udf7c'
699+
}
700+
]);
701+
});
702+
703+
test('person feeding baby', () => {
704+
expect(parse('\ud83e\uddd1\u200d\ud83c\udf7c')).toMatchObject([
705+
{
706+
indices: [0, 5],
707+
text: '\ud83e\uddd1\u200d\ud83c\udf7c'
708+
}
709+
]);
710+
});
711+
});
655712
});

‎src/lib/regex.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)