From 334a446313d504ef9bb80ce213be32729aa3d2b8 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Tue, 3 Oct 2017 04:11:22 -0700 Subject: [PATCH] Fix emoji sequence bug in substring-trie (#5191) Fixes #5188 --- package.json | 2 +- spec/javascript/components/emojify.test.js | 5 +++++ yarn.lock | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0b7f9128e..11de3c636 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "sass-loader": "^6.0.6", "stringz": "^0.2.2", "style-loader": "^0.18.2", - "substring-trie": "^1.0.1", + "substring-trie": "^1.0.2", "throng": "^4.0.0", "tiny-queue": "^0.2.1", "uuid": "^3.1.0", diff --git a/spec/javascript/components/emojify.test.js b/spec/javascript/components/emojify.test.js index 6e73c9251..4202e52e1 100644 --- a/spec/javascript/components/emojify.test.js +++ b/spec/javascript/components/emojify.test.js @@ -44,4 +44,9 @@ describe('emojify', () => { it('ignores unicode inside of tags', () => { expect(emojify('

')).to.equal('

'); }); + + it('does multiple emoji properly (issue 5188)', () => { + expect(emojify('👌🌈💕')).to.equal('👌🌈💕'); + expect(emojify('👌 🌈 💕')).to.equal('👌 🌈 💕'); + }); }); diff --git a/yarn.lock b/yarn.lock index 95cd2b06e..3aa39a415 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6581,9 +6581,9 @@ style-loader@^0.18.2: loader-utils "^1.0.2" schema-utils "^0.3.0" -substring-trie@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/substring-trie/-/substring-trie-1.0.1.tgz#1a5f07f774a91524eb067cb318dd4f3a3037bee0" +substring-trie@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/substring-trie/-/substring-trie-1.0.2.tgz#7b42592391628b4f2cb17365c6cce4257c7b7af5" sugarss@^1.0.0: version "1.0.0"