{"action":"created","comment":{"url":"https://api.github.com/repos/android/android-ktx/pulls/comments/172028713","pull_request_review_id":100986903,"id":172028713,"diff_hunk":"@@ -0,0 +1,61 @@\n+/*\n+ * Copyright (C) 2018 The Android Open Source Project\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *       http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package androidx.text\n+\n+import android.text.Html\n+import android.text.Html.ImageGetter\n+import android.text.Html.TagHandler\n+import org.junit.Assert.assertEquals\n+import org.junit.Test\n+\n+class HtmlTest {\n+    @Test fun parseAsHtml() {\n+        val expected = \"Hi \\u00a9 > <\"\n+        val actual = \"<b>Hi</b> © > <\".parseAsHtml().toString()\n+\n+        assertEquals(expected, actual)\n+    }\n+\n+    @Test fun parseAsHtmlFlags() {\n+        val expected = \"Hi \\u00a9 > <\"\n+        val actual = \"<b>Hi</b> © > <\".parseAsHtml(Html.FROM_HTML_MODE_COMPACT).toString()\n+\n+        assertEquals(expected, actual)\n+    }\n+\n+    @Test fun parseAsHtmlImageGetterTagHandler() {\n+        val expected = \"Hi \\u00a9 > <\"\n+        val actual = \"<b>Hi</b> © > <\"\n+            .parseAsHtml(Html.FROM_HTML_MODE_COMPACT, imageGetter, tagHandler)\n+            .toString()\n+\n+        assertEquals(expected, actual)\n+    }\n+\n+    @Test fun parseAsHtmlFlagsImageGetterTagHandler() {\n+        val expected = \"Hi \\u00a9 > <\"\n+        val actual = \"<b>Hi</b> © > <\"\n+            .parseAsHtml(imageGetter = imageGetter, tagHandler = tagHandler)\n+            .toString()\n+\n+        assertEquals(expected, actual)\n+    }\n+\n+    private val imageGetter = ImageGetter { null }","path":"src/androidTest/java/androidx/text/HtmlTest.kt","position":58,"original_position":58,"commit_id":"681d431875992f4ec32ae133ba9964fb71ad6a8a","original_commit_id":"681d431875992f4ec32ae133ba9964fb71ad6a8a","user":{"login":"romainguy","id":869684,"avatar_url":"https://avatars1.githubusercontent.com/u/869684?v=4","gravatar_id":"","url":"https://api.github.com/users/romainguy","html_url":"https://github.com/romainguy","followers_url":"https://api.github.com/users/romainguy/followers","following_url":"https://api.github.com/users/romainguy/following{/other_user}","gists_url":"https://api.github.com/users/romainguy/gists{/gist_id}","starred_url":"https://api.github.com/users/romainguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainguy/subscriptions","organizations_url":"https://api.github.com/users/romainguy/orgs","repos_url":"https://api.github.com/users/romainguy/repos","events_url":"https://api.github.com/users/romainguy/events{/privacy}","received_events_url":"https://api.github.com/users/romainguy/received_events","type":"User","site_admin":false},"body":"Nitpick: properties should be at the top of the class","created_at":"2018-03-03T21:05:58Z","updated_at":"2018-03-03T21:06:05Z","html_url":"https://github.com/android/android-ktx/pull/385#discussion_r172028713","pull_request_url":"https://api.github.com/repos/android/android-ktx/pulls/385","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/android/android-ktx/pulls/comments/172028713"},"html":{"href":"https://github.com/android/android-ktx/pull/385#discussion_r172028713"},"pull_request":{"href":"https://api.github.com/repos/android/android-ktx/pulls/385"}}},"pull_request":{"url":"https://api.github.com/repos/android/android-ktx/pulls/385","id":172429444,"html_url":"https://github.com/android/android-ktx/pull/385","diff_url":"https://github.com/android/android-ktx/pull/385.diff","patch_url":"https://github.com/android/android-ktx/pull/385.patch","issue_url":"https://api.github.com/repos/android/android-ktx/issues/385","number":385,"state":"open","locked":false,"title":"Extension for Html.fromHtml - closes #317","user":{"login":"jaredsburrows","id":1739848,"avatar_url":"https://avatars0.githubusercontent.com/u/1739848?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredsburrows","html_url":"https://github.com/jaredsburrows","followers_url":"https://api.github.com/users/jaredsburrows/followers","following_url":"https://api.github.com/users/jaredsburrows/following{/other_user}","gists_url":"https://api.github.com/users/jaredsburrows/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredsburrows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredsburrows/subscriptions","organizations_url":"https://api.github.com/users/jaredsburrows/orgs","repos_url":"https://api.github.com/users/jaredsburrows/repos","events_url":"https://api.github.com/users/jaredsburrows/events{/privacy}","received_events_url":"https://api.github.com/users/jaredsburrows/received_events","type":"User","site_admin":false},"body":"Closes #317 @JakeWharton @romainguy \r\n","created_at":"2018-03-02T06:09:53Z","updated_at":"2018-03-03T21:06:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a07034b12c1a9c191a645ff2f5dc1274b20f3da","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/android/android-ktx/pulls/385/commits","review_comments_url":"https://api.github.com/repos/android/android-ktx/pulls/385/comments","review_comment_url":"https://api.github.com/repos/android/android-ktx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/android/android-ktx/issues/385/comments","statuses_url":"https://api.github.com/repos/android/android-ktx/statuses/681d431875992f4ec32ae133ba9964fb71ad6a8a","head":{"label":"jaredsburrows:jb/fromHtml","ref":"jb/fromHtml","sha":"681d431875992f4ec32ae133ba9964fb71ad6a8a","user":{"login":"jaredsburrows","id":1739848,"avatar_url":"https://avatars0.githubusercontent.com/u/1739848?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredsburrows","html_url":"https://github.com/jaredsburrows","followers_url":"https://api.github.com/users/jaredsburrows/followers","following_url":"https://api.github.com/users/jaredsburrows/following{/other_user}","gists_url":"https://api.github.com/users/jaredsburrows/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredsburrows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredsburrows/subscriptions","organizations_url":"https://api.github.com/users/jaredsburrows/orgs","repos_url":"https://api.github.com/users/jaredsburrows/repos","events_url":"https://api.github.com/users/jaredsburrows/events{/privacy}","received_events_url":"https://api.github.com/users/jaredsburrows/received_events","type":"User","site_admin":false},"repo":{"id":120875643,"name":"android-ktx","full_name":"jaredsburrows/android-ktx","owner":{"login":"jaredsburrows","id":1739848,"avatar_url":"https://avatars0.githubusercontent.com/u/1739848?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredsburrows","html_url":"https://github.com/jaredsburrows","followers_url":"https://api.github.com/users/jaredsburrows/followers","following_url":"https://api.github.com/users/jaredsburrows/following{/other_user}","gists_url":"https://api.github.com/users/jaredsburrows/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredsburrows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredsburrows/subscriptions","organizations_url":"https://api.github.com/users/jaredsburrows/orgs","repos_url":"https://api.github.com/users/jaredsburrows/repos","events_url":"https://api.github.com/users/jaredsburrows/events{/privacy}","received_events_url":"https://api.github.com/users/jaredsburrows/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jaredsburrows/android-ktx","description":"A set of Kotlin extensions for Android app development.","fork":true,"url":"https://api.github.com/repos/jaredsburrows/android-ktx","forks_url":"https://api.github.com/repos/jaredsburrows/android-ktx/forks","keys_url":"https://api.github.com/repos/jaredsburrows/android-ktx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jaredsburrows/android-ktx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jaredsburrows/android-ktx/teams","hooks_url":"https://api.github.com/repos/jaredsburrows/android-ktx/hooks","issue_events_url":"https://api.github.com/repos/jaredsburrows/android-ktx/issues/events{/number}","events_url":"https://api.github.com/repos/jaredsburrows/android-ktx/events","assignees_url":"https://api.github.com/repos/jaredsburrows/android-ktx/assignees{/user}","branches_url":"https://api.github.com/repos/jaredsburrows/android-ktx/branches{/branch}","tags_url":"https://api.github.com/repos/jaredsburrows/android-ktx/tags","blobs_url":"https://api.github.com/repos/jaredsburrows/android-ktx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jaredsburrows/android-ktx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jaredsburrows/android-ktx/git/refs{/sha}","trees_url":"https://api.github.com/repos/jaredsburrows/android-ktx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jaredsburrows/android-ktx/statuses/{sha}","languages_url":"https://api.github.com/repos/jaredsburrows/android-ktx/languages","stargazers_url":"https://api.github.com/repos/jaredsburrows/android-ktx/stargazers","contributors_url":"https://api.github.com/repos/jaredsburrows/android-ktx/contributors","subscribers_url":"https://api.github.com/repos/jaredsburrows/android-ktx/subscribers","subscription_url":"https://api.github.com/repos/jaredsburrows/android-ktx/subscription","commits_url":"https://api.github.com/repos/jaredsburrows/android-ktx/commits{/sha}","git_commits_url":"https://api.github.com/repos/jaredsburrows/android-ktx/git/commits{/sha}","comments_url":"https://api.github.com/repos/jaredsburrows/android-ktx/comments{/number}","issue_comment_url":"https://api.github.com/repos/jaredsburrows/android-ktx/issues/comments{/number}","contents_url":"https://api.github.com/repos/jaredsburrows/android-ktx/contents/{+path}","compare_url":"https://api.github.com/repos/jaredsburrows/android-ktx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jaredsburrows/android-ktx/merges","archive_url":"https://api.github.com/repos/jaredsburrows/android-ktx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jaredsburrows/android-ktx/downloads","issues_url":"https://api.github.com/repos/jaredsburrows/android-ktx/issues{/number}","pulls_url":"https://api.github.com/repos/jaredsburrows/android-ktx/pulls{/number}","milestones_url":"https://api.github.com/repos/jaredsburrows/android-ktx/milestones{/number}","notifications_url":"https://api.github.com/repos/jaredsburrows/android-ktx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jaredsburrows/android-ktx/labels{/name}","releases_url":"https://api.github.com/repos/jaredsburrows/android-ktx/releases{/id}","deployments_url":"https://api.github.com/repos/jaredsburrows/android-ktx/deployments","created_at":"2018-02-09T07:59:30Z","updated_at":"2018-02-09T07:59:32Z","pushed_at":"2018-03-03T20:30:39Z","git_url":"git://github.com/jaredsburrows/android-ktx.git","ssh_url":"git@github.com:jaredsburrows/android-ktx.git","clone_url":"https://github.com/jaredsburrows/android-ktx.git","svn_url":"https://github.com/jaredsburrows/android-ktx","homepage":"https://android.github.io/android-ktx/core-ktx/","size":3834,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"android:master","ref":"master","sha":"5a4dc89c06e07b72ad6edf76e14dc21defceb89d","user":{"login":"android","id":32689599,"avatar_url":"https://avatars3.githubusercontent.com/u/32689599?v=4","gravatar_id":"","url":"https://api.github.com/users/android","html_url":"https://github.com/android","followers_url":"https://api.github.com/users/android/followers","following_url":"https://api.github.com/users/android/following{/other_user}","gists_url":"https://api.github.com/users/android/gists{/gist_id}","starred_url":"https://api.github.com/users/android/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/android/subscriptions","organizations_url":"https://api.github.com/users/android/orgs","repos_url":"https://api.github.com/users/android/repos","events_url":"https://api.github.com/users/android/events{/privacy}","received_events_url":"https://api.github.com/users/android/received_events","type":"Organization","site_admin":false},"repo":{"id":112380358,"name":"android-ktx","full_name":"android/android-ktx","owner":{"login":"android","id":32689599,"avatar_url":"https://avatars3.githubusercontent.com/u/32689599?v=4","gravatar_id":"","url":"https://api.github.com/users/android","html_url":"https://github.com/android","followers_url":"https://api.github.com/users/android/followers","following_url":"https://api.github.com/users/android/following{/other_user}","gists_url":"https://api.github.com/users/android/gists{/gist_id}","starred_url":"https://api.github.com/users/android/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/android/subscriptions","organizations_url":"https://api.github.com/users/android/orgs","repos_url":"https://api.github.com/users/android/repos","events_url":"https://api.github.com/users/android/events{/privacy}","received_events_url":"https://api.github.com/users/android/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/android/android-ktx","description":"A set of Kotlin extensions for Android app development.","fork":false,"url":"https://api.github.com/repos/android/android-ktx","forks_url":"https://api.github.com/repos/android/android-ktx/forks","keys_url":"https://api.github.com/repos/android/android-ktx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/android/android-ktx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/android/android-ktx/teams","hooks_url":"https://api.github.com/repos/android/android-ktx/hooks","issue_events_url":"https://api.github.com/repos/android/android-ktx/issues/events{/number}","events_url":"https://api.github.com/repos/android/android-ktx/events","assignees_url":"https://api.github.com/repos/android/android-ktx/assignees{/user}","branches_url":"https://api.github.com/repos/android/android-ktx/branches{/branch}","tags_url":"https://api.github.com/repos/android/android-ktx/tags","blobs_url":"https://api.github.com/repos/android/android-ktx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/android/android-ktx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/android/android-ktx/git/refs{/sha}","trees_url":"https://api.github.com/repos/android/android-ktx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/android/android-ktx/statuses/{sha}","languages_url":"https://api.github.com/repos/android/android-ktx/languages","stargazers_url":"https://api.github.com/repos/android/android-ktx/stargazers","contributors_url":"https://api.github.com/repos/android/android-ktx/contributors","subscribers_url":"https://api.github.com/repos/android/android-ktx/subscribers","subscription_url":"https://api.github.com/repos/android/android-ktx/subscription","commits_url":"https://api.github.com/repos/android/android-ktx/commits{/sha}","git_commits_url":"https://api.github.com/repos/android/android-ktx/git/commits{/sha}","comments_url":"https://api.github.com/repos/android/android-ktx/comments{/number}","issue_comment_url":"https://api.github.com/repos/android/android-ktx/issues/comments{/number}","contents_url":"https://api.github.com/repos/android/android-ktx/contents/{+path}","compare_url":"https://api.github.com/repos/android/android-ktx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/android/android-ktx/merges","archive_url":"https://api.github.com/repos/android/android-ktx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/android/android-ktx/downloads","issues_url":"https://api.github.com/repos/android/android-ktx/issues{/number}","pulls_url":"https://api.github.com/repos/android/android-ktx/pulls{/number}","milestones_url":"https://api.github.com/repos/android/android-ktx/milestones{/number}","notifications_url":"https://api.github.com/repos/android/android-ktx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/android/android-ktx/labels{/name}","releases_url":"https://api.github.com/repos/android/android-ktx/releases{/id}","deployments_url":"https://api.github.com/repos/android/android-ktx/deployments","created_at":"2017-11-28T19:37:32Z","updated_at":"2018-03-03T19:12:54Z","pushed_at":"2018-03-03T20:31:29Z","git_url":"git://github.com/android/android-ktx.git","ssh_url":"git@github.com:android/android-ktx.git","clone_url":"https://github.com/android/android-ktx.git","svn_url":"https://github.com/android/android-ktx","homepage":"https://android.github.io/android-ktx/core-ktx/","size":4004,"stargazers_count":4685,"watchers_count":4685,"language":"Kotlin","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":345,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":345,"open_issues":58,"watchers":4685,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/android/android-ktx/pulls/385"},"html":{"href":"https://github.com/android/android-ktx/pull/385"},"issue":{"href":"https://api.github.com/repos/android/android-ktx/issues/385"},"comments":{"href":"https://api.github.com/repos/android/android-ktx/issues/385/comments"},"review_comments":{"href":"https://api.github.com/repos/android/android-ktx/pulls/385/comments"},"review_comment":{"href":"https://api.github.com/repos/android/android-ktx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/android/android-ktx/pulls/385/commits"},"statuses":{"href":"https://api.github.com/repos/android/android-ktx/statuses/681d431875992f4ec32ae133ba9964fb71ad6a8a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"romainguy"}}