Since 0.4.5, URLs are also converted into emojis
See original GitHub issueThis happens definitely since 0.4.5 (this PR).
import Emoji, { toArray } from 'react-emoji-render';
// Within the component render():
const text = "https://google.foo :)";
const values = [];
const items = toArray(text);
let idx = 0;
for (const item of items)
{
values.push(
<Emoji
key={idx++}
text={item.props.children}
options={{ className: 'emoji' }}
/>
);
}
return (
<div>{values}</div>
);
This code is generating this:
https😕/google.foo 😃
As you can see, the :/ chars within the URL are also being converted into an emoji. Something tells me that it shouldn’t go so far.
I’m not sure what the solution should be, but IMHO it would make sense if the parser requires some space, tab, dot, comma or similar char before or after the matched emoji symbol.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
404 error for the resource "/partytown/partytown-sandbox-sw ...
I recently tried integrating Partytown for my website Mustakbil.com but encountered this error #38 (comment).
Read more >Improving sentiment analysis accuracy with emoji embedding
Emojis were also translated into corresponding sentiment words when constructing features for comparison with those directly generated from emoji label ...
Read more >Autocorrect emojis in documents and email - Microsoft Support
See how to add emojis and turn AutoText emojis off. ... When you type :) or :-) in Word or Outlook, autocorrect converts...
Read more >sopel-modules.github 0.4.8 - PyPI
Detects when GitHub URLs are posted and takes over URL handling of them, ... most :emoji_name: s will be converted to Unicode emoji...
Read more >Change log - TweeseCake
Mastodon: You can now pick a server emoji to insert into your text! Mastodon: Show full server URL in mastodon session title.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes sure, the thing is that doing so you are removing support of consecutive emojis like “😃😃”. I added this kind of support in v0.4.5 because imagine yourself writing a text and you want to automatically parse the text as you write. For example you write “hello” and then add “😃😛” (letter by letter obviously), the former “😛” wouldn’t get parsed.
I’m working on a solution that works for both cases right now, expect some news later in the day 👍
Thanks guys, I confirm that it works great now in all cases I’ve tested.