Skip to content

Commit 8283593

Browse files
committed
emoji aliases
1 parent e6e003f commit 8283593

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

IRCCloud/Classes/ColorFormatter.m

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,12 +1034,23 @@ +(NSRegularExpression *)emoji {
10341034
@"notebook":@"📓",
10351035
@"twisted_rightwards_arrows":@"🔀",
10361036
@"zero":@"0️⃣",
1037-
@"racehorse":@"🐎"};
1037+
@"racehorse":@"🐎",
1038+
1039+
@"doge":@"🐶",
1040+
@"<3":@"❤️",
1041+
@"</3":@"💔",
1042+
@")":@"😃",
1043+
@"-)":@"😃",
1044+
@"(":@"😞",
1045+
@"'(":@"😢",
1046+
@"_(":@"😭",
1047+
@";)":@"😉",
1048+
@";p":@"😜"};
10381049

10391050
static NSRegularExpression *_pattern;
10401051
if(!_pattern) {
10411052
NSError *err;
1042-
NSString *pattern = [NSString stringWithFormat:@"\\B:(%@):\\B", [[[emojiMap.allKeys componentsJoinedByString:@"|"] stringByReplacingOccurrencesOfString:@"-" withString:@"\\-"] stringByReplacingOccurrencesOfString:@"+" withString:@"\\+"]];
1053+
NSString *pattern = [NSString stringWithFormat:@"\\B:(%@):\\B", [[[[[emojiMap.allKeys componentsJoinedByString:@"|"] stringByReplacingOccurrencesOfString:@"-" withString:@"\\-"] stringByReplacingOccurrencesOfString:@"+" withString:@"\\+"] stringByReplacingOccurrencesOfString:@"(" withString:@"\\("] stringByReplacingOccurrencesOfString:@")" withString:@"\\)"]];
10431054
_pattern = [NSRegularExpression
10441055
regularExpressionWithPattern:pattern
10451056
options:0

0 commit comments

Comments
 (0)