question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Messages containing emoji and colors are not fully optimized

See original GitHub issue

See https://github.com/thelounge/lounge/pull/1770#discussion_r154022888

When parsing Super \x034💚 green!, result should be:

Super <span class="emoji irc-fg4">💚</span><span class="irc-fg4"> green!</span>

It is instead:

Super <span class="emoji"><span class="irc-fg4">💚</span></span><span class="irc-fg4"> green!</span>

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
xPawcommented, Mar 22, 2018

@Bonuspunkt Do you have any interest in looking into this? (and #2276)

My understanding is that merge in parse needs to be done differently because it simply wraps fragments it wants in it’s own elements (which is why emoji span ends up containing a duplicate formatting span). This is the case for all parts that generate their own HTML (emojis, links, channels, nicks).

Not sure how we would optimize this though. Remake createFragment to also accept custom data so that it can generate a single element?

And even then, it should be a little smarter than that in fragment generation, if a formatter completely wraps a link, it should just let the link sit inside the formatted element.

1reaction
xPawcommented, Dec 1, 2017

<span class="irc-fg4"><span class="emoji">💚</span> green!</span> would also be fine by me, depending on the complexity.

@Bonuspunkt I remember this coming up before for other elements but not the reason why, do you remember why it’s not being optimized away?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Messages containing emoji and colors are not fully optimized · Issue ...
Messages containing emoji and colors are not fully optimized #1783. Open. astorije opened this issue on Nov 30, 2017 · 9 comments.
Read more >
Bug #1269017 “Emojis not fully supported which results in ...
Emoji support was *just* added to Android 4.4, and in fact isn't quite compatible with older releases of Android which support non-color emoji....
Read more >
Pressuring Apple to Fix Texting, Google's Android Will Force ...
One feature that's part of Google's payback to Apple is that now, when Messages users react to an SMS text with an emoji,...
Read more >
Special Characters, Emojis, Line Breaks: More Tricks ... - Litmus
Special Characters, Emojis, Line Breaks: More Tricks for Optimizing Your Emails for Screen Readers. Categories. Tips & Resources.
Read more >
Support modern emoji - Android Developers
You're running the app on a recently-flashed device or a brand new emulator · Your app isn't using an AppCompat text-related class ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found