Changes
2 changed files (+8/-5)
-
-
@@ -119,8 +119,9 @@ ]}) ) const parseEmoji = explicit( regexp(/^:([^:]+?)(::([^:]+?))?:(?=\s|$)/, (match, text, position) => { const parseEmoji = regexp( /^:([^:<]+?)(::([^:]+?))?:/, (match, text, position) => { const [matchedText, name, _, variation] = match return [
-
@@ -131,7 +132,7 @@ variation}, position + matchedText.length ] }) } ) const parseLink = regexp(
-
-
-
@@ -148,8 +148,10 @@ it('Should parse emoji with variation', () => {expect(parse(':foo::bar:')).toEqual(root([emoji('foo', 'bar')])) }) it('Should not parse "foo:bar:baz" as emoji', () => { expect(parse('foo:bar:baz')).toEqual(root([text('foo:bar:baz')])) it('Should parse "foo:bar:baz" as emoji', () => { expect(parse('foo:bar:baz')).toEqual( root([text('foo'), emoji('bar'), text('baz')]) ) }) })
-