diff options
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | spec/javascript/components/emojify.test.js | 5 | ||||
-rw-r--r-- | 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('<p data-foo="\uD83D\uDC69\uD83D\uDC69\uD83D\uDC66"></p>')).to.equal('<p data-foo="\uD83D\uDC69\uD83D\uDC69\uD83D\uDC66"></p>'); }); + + it('does multiple emoji properly (issue 5188)', () => { + expect(emojify('👌🌈💕')).to.equal('<img draggable="false" class="emojione" alt="👌" title=":ok_hand:" src="/emoji/1f44c.svg" /><img draggable="false" class="emojione" alt="🌈" title=":rainbow:" src="/emoji/1f308.svg" /><img draggable="false" class="emojione" alt="💕" title=":two_hearts:" src="/emoji/1f495.svg" />'); + expect(emojify('👌 🌈 💕')).to.equal('<img draggable="false" class="emojione" alt="👌" title=":ok_hand:" src="/emoji/1f44c.svg" /> <img draggable="false" class="emojione" alt="🌈" title=":rainbow:" src="/emoji/1f308.svg" /> <img draggable="false" class="emojione" alt="💕" title=":two_hearts:" src="/emoji/1f495.svg" />'); + }); }); 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" |