about summary refs log tree commit diff
path: root/spec/javascript/components
diff options
context:
space:
mode:
authorNolan Lawson <nolan@nolanlawson.com>2017-10-03 04:11:22 -0700
committerEugen Rochko <eugen@zeonfederated.com>2017-10-03 13:11:22 +0200
commit334a446313d504ef9bb80ce213be32729aa3d2b8 (patch)
tree898a27c7b1db5cc63137721e4851e4394099b8cb /spec/javascript/components
parentecacb15cd50609fb3d749ecac89835a43255fb34 (diff)
Fix emoji sequence bug in substring-trie (#5191)
Fixes #5188
Diffstat (limited to 'spec/javascript/components')
-rw-r--r--spec/javascript/components/emojify.test.js5
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" />');
+  });
 });