From ee1da73a693beb9da99e69a95a9d2dc56113d3a6 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 9 Jun 2017 11:59:18 -0700 Subject: [PATCH] Add regression test --- src/Linkifier.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Linkifier.test.ts b/src/Linkifier.test.ts index 2450ffb..c6e59d8 100644 --- a/src/Linkifier.test.ts +++ b/src/Linkifier.test.ts @@ -119,6 +119,12 @@ describe('Linkifier', () => { it('should match a link immediately after a link at the end of a text node', done => { assertLinkifiesRow('foo barbaz', /bar|baz/, 'foo barbaz', 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 \'🔷foo\'', /foo/, 'echo \'🔷foo\'', done); + }); }); describe('validationCallback', () => {