Fix a few issues with text emotes.

1. Fix the heart emote text overlay.
2. Added a missing text emote to the replacements.
3. Replace > with >
This commit is contained in:
Lajamerr Mittesdine 2018-06-04 17:24:54 -04:00 committed by fourtf
parent 10b0466052
commit 3c8bb5e9bb

View file

@ -547,13 +547,14 @@ util::EmoteData EmoteManager::getTwitchEmoteById(long id, const QString &emoteNa
{ {
QString _emoteName = emoteName; QString _emoteName = emoteName;
_emoteName.replace("<", "&lt;"); _emoteName.replace("<", "&lt;");
_emoteName.replace(">", "&gt;");
static QMap<QString, QString> emoteNameReplacements{ static QMap<QString, QString> emoteNameReplacements{
{"[oO](_|\\.)[oO]", "o_O"}, {"\\&gt\\;\\(", ">("}, {"\\&lt\\;3", "<3"}, {"\\:-?\\)", ":-)"}, {"\\:-?\\(", ":-("}, {"\\:-?D", ":-D"},
{"\\:-?(o|O)", ":O"}, {"\\:-?(p|P)", ":P"}, {"\\:-?[\\\\/]", ":/"}, {"\\&gt\\;\\(", "&gt;("}, {"\\:-?[z|Z|\\|]", ":-Z"}, {"[oO](_|\\.)[oO]", "O_o"},
{"\\:-?[z|Z|\\|]", ":z"}, {"\\:-?\\(", ":("}, {"\\:-?\\)", ":)"}, {"B-?\\)", "B-)"}, {"\\:-?(o|O)", ":-O"}, {"\\&lt\\;3", "&lt;3"},
{"\\:-?D", ":D"}, {"\\;-?(p|P)", ";P"}, {"\\;-?\\)", ";)"}, {"\\:-?[\\\\/]", ":-/"}, {"\\;-?\\)", ";-)"}, {"\\:-?(p|P)", ":-P"},
{"R-?\\)", "R-)"}, {"\\;-?(p|P)", ";-P"}, {"R-?\\)", "R-)"},
}; };
auto it = emoteNameReplacements.find(_emoteName); auto it = emoteNameReplacements.find(_emoteName);