forPelevin / gomoji

Helpful functions to work with emoji in Golang
MIT License
190 stars 28 forks source link

ReplaceEmojisWithFunc: Unexpectedly trims strings #21

Closed Mukhammadsaid19 closed 3 months ago

Mukhammadsaid19 commented 3 months ago

Function ReplaceEmojisWithFunc unexpectedly returns trimmed version of strings, thus modifying the original string. I would like to know the reason behind this, as it's not the responsibility of this function.

forPelevin commented 3 months ago

Hi @Mukhammadsaid19 ,

Thank you for the catch. I agree that trimming of spaces is not a responsibility of the replacer function so I fixed it in the PR: https://github.com/forPelevin/gomoji/pull/22