{"action":"created","comment":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments/40693428","id":40693428,"diff_hunk":"@@ -126,9 +139,37 @@ - (NSString *)stringByReplacingHTMLEmoticonsWithEmoji\n             [result replaceCharactersInRange:[match range] withString:replacement];\n         }\n     }\n+\n+    matches = [coreEmojiRegex matchesInString:result options:0 range:NSMakeRange(0, [result length])];\n+    for (NSTextCheckingResult *match in [matches reverseObjectEnumerator]) {\n+        NSRange range = [match rangeAtIndex:1];\n+        NSString *filename = [result substringWithRange:range];\n+        NSString *replacement = [self emojiUnicodeFromCoreEmojiFilename:filename];\n+        if (replacement) {\n+            [result replaceCharactersInRange:[match range] withString:replacement];\n+        }\n+    }\n+\n     return [NSString stringWithString:result];\n }\n \n+/**\n+ Pass the hex string for a unicode character and returns that unicode character. \n+ Core WordPress emoji images are named after their unicode code point. This makes\n+ it convenient to scan the filename for its hex value and return the appropriate\n+ emoji character.\n+ */\n+- (NSString *)emojiUnicodeFromCoreEmojiFilename:(NSString *)filename","path":"WordPress/Classes/Categories/NSString+Helpers.m","position":96,"original_position":96,"commit_id":"5389daa9422e35e8a05d0551a13e2c70f73a03f2","original_commit_id":"5389daa9422e35e8a05d0551a13e2c70f73a03f2","user":{"login":"koke","id":8739,"avatar_url":"https://avatars.githubusercontent.com/u/8739?v=3","gravatar_id":"","url":"https://api.github.com/users/koke","html_url":"https://github.com/koke","followers_url":"https://api.github.com/users/koke/followers","following_url":"https://api.github.com/users/koke/following{/other_user}","gists_url":"https://api.github.com/users/koke/gists{/gist_id}","starred_url":"https://api.github.com/users/koke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koke/subscriptions","organizations_url":"https://api.github.com/users/koke/orgs","repos_url":"https://api.github.com/users/koke/repos","events_url":"https://api.github.com/users/koke/events{/privacy}","received_events_url":"https://api.github.com/users/koke/received_events","type":"User","site_admin":false},"body":"It's kind of weird that you'd pass a string to a string method. Shouldn't this be `- (NSString *)emojiUnicodeFromCoreEmojiFilename` and just use `self`?","created_at":"2015-09-29T16:19:38Z","updated_at":"2015-09-29T16:19:38Z","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/4315#discussion_r40693428","pull_request_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/4315","_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments/40693428"},"html":{"href":"https://github.com/wordpress-mobile/WordPress-iOS/pull/4315#discussion_r40693428"},"pull_request":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/4315"}}},"pull_request":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/4315","id":46210954,"html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/4315","diff_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/4315.diff","patch_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/4315.patch","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/4315","number":4315,"state":"open","locked":false,"title":"Reader: Replace images from core emoji with emoji strings.","user":{"login":"aerych","id":1435271,"avatar_url":"https://avatars.githubusercontent.com/u/1435271?v=3","gravatar_id":"","url":"https://api.github.com/users/aerych","html_url":"https://github.com/aerych","followers_url":"https://api.github.com/users/aerych/followers","following_url":"https://api.github.com/users/aerych/following{/other_user}","gists_url":"https://api.github.com/users/aerych/gists{/gist_id}","starred_url":"https://api.github.com/users/aerych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerych/subscriptions","organizations_url":"https://api.github.com/users/aerych/orgs","repos_url":"https://api.github.com/users/aerych/repos","events_url":"https://api.github.com/users/aerych/events{/privacy}","received_events_url":"https://api.github.com/users/aerych/received_events","type":"User","site_admin":false},"body":"Closes #4298 \r\nAdds a check for images that are core emoji. \r\nConverts matches to their emoji string equivalent. \r\nAdds unit tests.\r\n\r\nTo test: \r\nConfirm the emoji shown in #4298 is showing the correct size. \r\n\r\nNeed Review: @koke ","created_at":"2015-09-28T21:33:01Z","updated_at":"2015-09-29T16:19:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3ddade53cfb24a09dfb2318d94119746febf767","assignee":null,"milestone":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones/46","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/milestones/5.7","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones/46/labels","id":1188116,"number":46,"title":"5.7","description":null,"creator":{"login":"sendhil","id":437043,"avatar_url":"https://avatars.githubusercontent.com/u/437043?v=3","gravatar_id":"","url":"https://api.github.com/users/sendhil","html_url":"https://github.com/sendhil","followers_url":"https://api.github.com/users/sendhil/followers","following_url":"https://api.github.com/users/sendhil/following{/other_user}","gists_url":"https://api.github.com/users/sendhil/gists{/gist_id}","starred_url":"https://api.github.com/users/sendhil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendhil/subscriptions","organizations_url":"https://api.github.com/users/sendhil/orgs","repos_url":"https://api.github.com/users/sendhil/repos","events_url":"https://api.github.com/users/sendhil/events{/privacy}","received_events_url":"https://api.github.com/users/sendhil/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":61,"state":"open","created_at":"2015-06-30T23:23:14Z","updated_at":"2015-09-29T14:29:13Z","due_on":"2015-10-08T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/4315/commits","review_comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/4315/comments","review_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/4315/comments","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/5389daa9422e35e8a05d0551a13e2c70f73a03f2","head":{"label":"wordpress-mobile:issues/4298-filter-core-emoji","ref":"issues/4298-filter-core-emoji","sha":"5389daa9422e35e8a05d0551a13e2c70f73a03f2","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":8859285,"name":"WordPress-iOS","full_name":"wordpress-mobile/WordPress-iOS","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPress-iOS","description":"WordPress for iOS - Official repository","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/releases{/id}","created_at":"2013-03-18T16:59:33Z","updated_at":"2015-09-29T14:18:39Z","pushed_at":"2015-09-29T14:03:22Z","git_url":"git://github.com/wordpress-mobile/WordPress-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPress-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPress-iOS","homepage":"http://ios.wordpress.org/","size":407964,"stargazers_count":723,"watchers_count":723,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":362,"mirror_url":null,"open_issues_count":367,"forks":362,"open_issues":367,"watchers":723,"default_branch":"develop"}},"base":{"label":"wordpress-mobile:develop","ref":"develop","sha":"db2671bde25d496e6ebe3e6f5094faca449b1831","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":8859285,"name":"WordPress-iOS","full_name":"wordpress-mobile/WordPress-iOS","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPress-iOS","description":"WordPress for iOS - Official repository","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/releases{/id}","created_at":"2013-03-18T16:59:33Z","updated_at":"2015-09-29T14:18:39Z","pushed_at":"2015-09-29T14:03:22Z","git_url":"git://github.com/wordpress-mobile/WordPress-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPress-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPress-iOS","homepage":"http://ios.wordpress.org/","size":407964,"stargazers_count":723,"watchers_count":723,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":362,"mirror_url":null,"open_issues_count":367,"forks":362,"open_issues":367,"watchers":723,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/4315"},"html":{"href":"https://github.com/wordpress-mobile/WordPress-iOS/pull/4315"},"issue":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/4315"},"comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/4315/comments"},"review_comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/4315/comments"},"review_comment":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/4315/commits"},"statuses":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/5389daa9422e35e8a05d0551a13e2c70f73a03f2"}}}}