diff options
author | Nolan Lawson <nolan@nolanlawson.com> | 2017-10-03 04:11:22 -0700 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-03 13:11:22 +0200 |
commit | 334a446313d504ef9bb80ce213be32729aa3d2b8 (patch) | |
tree | 898a27c7b1db5cc63137721e4851e4394099b8cb /spec | |
parent | ecacb15cd50609fb3d749ecac89835a43255fb34 (diff) |
Fix emoji sequence bug in substring-trie (#5191)
Fixes #5188
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascript/components/emojify.test.js | 5 |
1 files changed, 5 insertions, 0 deletions
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" />'); + }); }); |