Messages containing emoji and colors are not fully optimized
See original GitHub issueSee 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:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
@Bonuspunkt Do you have any interest in looking into this? (and #2276)
My understanding is that
merge
inparse
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.
<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?