gempir / go-twitch-irc

go irc client for twitch.tv
MIT License
358 stars 59 forks source link

Added emote position extraction to emote parse. #157

Closed Cidan closed 3 years ago

Cidan commented 3 years ago

This CL adds a new field called Positions to the Emote struct. Positions is a list of EmotePosition, which marks the start and end character of an emote, as sent by the Twitch API.

This allows for downstream consumers of this library to quickly replace emotes in text, without the need to parse/regex the message string.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-0.4%) to 98.39% when pulling 91f7dc14e694322786a02213315f85804d6f801f on Cidan:master into 2ffb3958f61a48f355e20b1c5b8eb6778e4a1742 on gempir:master.

gempir commented 3 years ago

Thank you for the contribution! Certainly a nice feature to have.