LiveBot icon indicating copy to clipboard operation
LiveBot copied to clipboard

[Bug/Improvement] Emoji converter

Open RobinRMC opened this issue 3 years ago • 0 comments

What release are you using?

  • Release: v1.1.4-alpha

Error

The bot gives emoji conversion priority over markdown.

Steps required to reproduce the bug

Refer to the screenshot

Screenshots (examples)

Expected result: https://imgur.com/VyUo1Qx Actual result: https://imgur.com/dQPrLH2

Improvement

Give markdown priority over emoji conversion. In the examples (screenshots), it should choose to use the star (*) for markdown instead of an emoji. I think this can be achieved by checking if a markdown pattern is recognized, like double stars (**) or if there is a star (*) present after a colon (:), check if there is another star somewhere earlier in the message without a colon (:) in front of it. If there is a markdown pattern, skip the conversion of the stars. Or if two stars (**) are present after a colon (:), don't convert the colon and first star to an emoji, but rather give priority to the two stars (**). Another solution would be removing the conversion to an emoji of ':*'.

The last solution is how I fixed the issue for myself.

RobinRMC avatar Jun 15 '22 09:06 RobinRMC