]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Add regression test
authorDaniel Imms <daimms@microsoft.com>
Fri, 9 Jun 2017 18:59:18 +0000 (11:59 -0700)
committerDaniel Imms <daimms@microsoft.com>
Fri, 9 Jun 2017 18:59:18 +0000 (11:59 -0700)
src/Linkifier.test.ts

index 2450ffb94c2815846b95bbb699eb6d11940d22a6..c6e59d84dba5169aec0bd510a2594e9a05fcba65 100644 (file)
@@ -119,6 +119,12 @@ describe('Linkifier', () => {
       it('should match a link immediately after a link at the end of a text node', done => {
         assertLinkifiesRow('<span>foo bar</span>baz', /bar|baz/, '<span>foo <a>bar</a></span><a>baz</a>', done);
       });
+      it('should not duplicate text after a unicode character (wrapped in a span)', done => {
+        // This is a regression test for an issue that came about when using
+        // an oh-my-zsh theme that added the large blue diamond unicode
+        // character (U+1F537) which caused the path to be duplicated. See #642.
+        assertLinkifiesRow('echo \'<span class="xterm-normal-char">🔷</span>foo\'', /foo/, 'echo \'<span class="xterm-normal-char">🔷</span><a>foo</a>\'', done);
+      });
     });
 
     describe('validationCallback', () => {