sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
291 stars 27 forks source link

Handle animated emoji #144

Closed jwheare closed 6 years ago

jwheare commented 6 years ago

This resolves #139

There's probably a cleverer way to do this with a single regex but this works.

sm00th commented 6 years ago

Hi, thanks for the PR. Do I understand correctly that the only difference between those 2 is the a after < and the rest is completely identical? If so it definitely can be a single regex: <a?(:[^:]+:)(\\d+)>, which makes a optional should work.

jwheare commented 6 years ago

Yup, but you also need to switch out png for gif depending on whether a is present.

sm00th commented 6 years ago

Right, I missed that. This should be fine then.