uslug icon indicating copy to clipboard operation
uslug copied to clipboard

Added support for emojis

Open laurent22 opened this issue 5 years ago β€’ 0 comments
trafficstars

The current version of the library strips off emojis from the strings, which is reasonable, but in certain cases emojis are an important part of the original string. This came up for example in this issue as we use the library to convert headers to link IDs and once the emojis are stripped off, it results in empty strings or invalid IDs.

So this pull request adds support for it by converting the emoji to a string, which will now give results like this:

['😁', 'grin'],
['😁a', 'grina'],
['🐢🐢🐢🐱', 'dogdogdogcat'],

The pull request also adds a test for empty string (just to check that passing an empty string doesn't give any error).

laurent22 avatar Oct 16 '20 21:10 laurent22