{"action":"created","comment":{"url":"https://api.github.com/repos/dart-lang/markdown/pulls/comments/184911019","pull_request_review_id":116196449,"id":184911019,"diff_hunk":"@@ -0,0 +1,18 @@\n+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n+// for details. All rights reserved. Use of this source code is governed by a\n+// BSD-style license that can be found in the LICENSE file.\n+\n+import 'package:markdown/markdown.dart';\n+import 'package:test/test.dart';\n+\n+void main() {\n+  group('Document', () {\n+    test('guardHtml prevents less than and ampersand escaping', () {\n+      var document = new Document(guardHtml: true);\n+      var result = document.parseInline('< &');\n+      expect(result, hasLength(1));","path":"test/document_test.dart","position":13,"original_position":13,"commit_id":"d4803f7cae19a0e66432f15777902581ec7669bb","original_commit_id":"d4803f7cae19a0e66432f15777902581ec7669bb","user":{"login":"westy92","id":290167,"avatar_url":"https://avatars0.githubusercontent.com/u/290167?v=4","gravatar_id":"","url":"https://api.github.com/users/westy92","html_url":"https://github.com/westy92","followers_url":"https://api.github.com/users/westy92/followers","following_url":"https://api.github.com/users/westy92/following{/other_user}","gists_url":"https://api.github.com/users/westy92/gists{/gist_id}","starred_url":"https://api.github.com/users/westy92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westy92/subscriptions","organizations_url":"https://api.github.com/users/westy92/orgs","repos_url":"https://api.github.com/users/westy92/repos","events_url":"https://api.github.com/users/westy92/events{/privacy}","received_events_url":"https://api.github.com/users/westy92/received_events","type":"User","site_admin":false},"body":"I tried adding this to `Text`:\r\n\r\n```dart\r\nString toString() => '<text: $text>';\r\n```\r\n\r\nTest:\r\n```dart\r\ntest('guardHtml prevents less than and ampersand escaping', () {\r\n  var document = new Document(guardHtml: true);\r\n  var result = document.parseInline('< &');\r\n  var expected = [new Text('< &')];\r\n  expect(result, expected);\r\n});\r\n```\r\n\r\nResult:\r\n```\r\n00:24 +1586 -1: test/document_test.dart: Document guardHtml prevents less than and ampersand escaping [E]                                                             \r\n  Expected: [Text:<text: < &>]\r\n    Actual: [Text:<text: < &>]\r\n     Which: was Text:<<text: < &>> instead of Text:<<text: < &>> at location [0]\r\n  \r\n  package:test                  expect\r\n  test/document_test.dart 14:7  main.<fn>.<fn>\r\n  \r\n00:29 +2484 -1: Some tests failed.  \r\n```","created_at":"2018-04-30T04:46:20Z","updated_at":"2018-04-30T04:46:20Z","html_url":"https://github.com/dart-lang/markdown/pull/218#discussion_r184911019","pull_request_url":"https://api.github.com/repos/dart-lang/markdown/pulls/218","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/markdown/pulls/comments/184911019"},"html":{"href":"https://github.com/dart-lang/markdown/pull/218#discussion_r184911019"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/markdown/pulls/218"}},"in_reply_to_id":184908671},"pull_request":{"url":"https://api.github.com/repos/dart-lang/markdown/pulls/218","id":184874234,"html_url":"https://github.com/dart-lang/markdown/pull/218","diff_url":"https://github.com/dart-lang/markdown/pull/218.diff","patch_url":"https://github.com/dart-lang/markdown/pull/218.patch","issue_url":"https://api.github.com/repos/dart-lang/markdown/issues/218","number":218,"state":"open","locked":false,"title":"Add Document option to prevent HTML escaping.","user":{"login":"westy92","id":290167,"avatar_url":"https://avatars0.githubusercontent.com/u/290167?v=4","gravatar_id":"","url":"https://api.github.com/users/westy92","html_url":"https://github.com/westy92","followers_url":"https://api.github.com/users/westy92/followers","following_url":"https://api.github.com/users/westy92/following{/other_user}","gists_url":"https://api.github.com/users/westy92/gists{/gist_id}","starred_url":"https://api.github.com/users/westy92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westy92/subscriptions","organizations_url":"https://api.github.com/users/westy92/orgs","repos_url":"https://api.github.com/users/westy92/repos","events_url":"https://api.github.com/users/westy92/events{/privacy}","received_events_url":"https://api.github.com/users/westy92/received_events","type":"User","site_admin":false},"body":"Fixes #211.\r\n\r\nI wasn't sure how to structure the added test since I didn't see any other `Document`-specific tests.","created_at":"2018-04-30T03:44:39Z","updated_at":"2018-04-30T04:46:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8734445f7884f1a2a7594a16ed63f8f722443a84","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":421017605,"url":"https://api.github.com/repos/dart-lang/markdown/labels/cla:%20yes","name":"cla: yes","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dart-lang/markdown/pulls/218/commits","review_comments_url":"https://api.github.com/repos/dart-lang/markdown/pulls/218/comments","review_comment_url":"https://api.github.com/repos/dart-lang/markdown/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dart-lang/markdown/issues/218/comments","statuses_url":"https://api.github.com/repos/dart-lang/markdown/statuses/d4803f7cae19a0e66432f15777902581ec7669bb","head":{"label":"westy92:guard-html","ref":"guard-html","sha":"d4803f7cae19a0e66432f15777902581ec7669bb","user":{"login":"westy92","id":290167,"avatar_url":"https://avatars0.githubusercontent.com/u/290167?v=4","gravatar_id":"","url":"https://api.github.com/users/westy92","html_url":"https://github.com/westy92","followers_url":"https://api.github.com/users/westy92/followers","following_url":"https://api.github.com/users/westy92/following{/other_user}","gists_url":"https://api.github.com/users/westy92/gists{/gist_id}","starred_url":"https://api.github.com/users/westy92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westy92/subscriptions","organizations_url":"https://api.github.com/users/westy92/orgs","repos_url":"https://api.github.com/users/westy92/repos","events_url":"https://api.github.com/users/westy92/events{/privacy}","received_events_url":"https://api.github.com/users/westy92/received_events","type":"User","site_admin":false},"repo":{"id":131547970,"name":"markdown","full_name":"westy92/markdown","owner":{"login":"westy92","id":290167,"avatar_url":"https://avatars0.githubusercontent.com/u/290167?v=4","gravatar_id":"","url":"https://api.github.com/users/westy92","html_url":"https://github.com/westy92","followers_url":"https://api.github.com/users/westy92/followers","following_url":"https://api.github.com/users/westy92/following{/other_user}","gists_url":"https://api.github.com/users/westy92/gists{/gist_id}","starred_url":"https://api.github.com/users/westy92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westy92/subscriptions","organizations_url":"https://api.github.com/users/westy92/orgs","repos_url":"https://api.github.com/users/westy92/repos","events_url":"https://api.github.com/users/westy92/events{/privacy}","received_events_url":"https://api.github.com/users/westy92/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/westy92/markdown","description":"A Dart markdown library","fork":true,"url":"https://api.github.com/repos/westy92/markdown","forks_url":"https://api.github.com/repos/westy92/markdown/forks","keys_url":"https://api.github.com/repos/westy92/markdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/westy92/markdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/westy92/markdown/teams","hooks_url":"https://api.github.com/repos/westy92/markdown/hooks","issue_events_url":"https://api.github.com/repos/westy92/markdown/issues/events{/number}","events_url":"https://api.github.com/repos/westy92/markdown/events","assignees_url":"https://api.github.com/repos/westy92/markdown/assignees{/user}","branches_url":"https://api.github.com/repos/westy92/markdown/branches{/branch}","tags_url":"https://api.github.com/repos/westy92/markdown/tags","blobs_url":"https://api.github.com/repos/westy92/markdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/westy92/markdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/westy92/markdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/westy92/markdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/westy92/markdown/statuses/{sha}","languages_url":"https://api.github.com/repos/westy92/markdown/languages","stargazers_url":"https://api.github.com/repos/westy92/markdown/stargazers","contributors_url":"https://api.github.com/repos/westy92/markdown/contributors","subscribers_url":"https://api.github.com/repos/westy92/markdown/subscribers","subscription_url":"https://api.github.com/repos/westy92/markdown/subscription","commits_url":"https://api.github.com/repos/westy92/markdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/westy92/markdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/westy92/markdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/westy92/markdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/westy92/markdown/contents/{+path}","compare_url":"https://api.github.com/repos/westy92/markdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/westy92/markdown/merges","archive_url":"https://api.github.com/repos/westy92/markdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/westy92/markdown/downloads","issues_url":"https://api.github.com/repos/westy92/markdown/issues{/number}","pulls_url":"https://api.github.com/repos/westy92/markdown/pulls{/number}","milestones_url":"https://api.github.com/repos/westy92/markdown/milestones{/number}","notifications_url":"https://api.github.com/repos/westy92/markdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/westy92/markdown/labels{/name}","releases_url":"https://api.github.com/repos/westy92/markdown/releases{/id}","deployments_url":"https://api.github.com/repos/westy92/markdown/deployments","created_at":"2018-04-30T02:26:25Z","updated_at":"2018-04-30T02:26:27Z","pushed_at":"2018-04-30T03:49:04Z","git_url":"git://github.com/westy92/markdown.git","ssh_url":"git@github.com:westy92/markdown.git","clone_url":"https://github.com/westy92/markdown.git","svn_url":"https://github.com/westy92/markdown","homepage":"https://pub.dartlang.org/packages/markdown","size":2392,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dart-lang:master","ref":"master","sha":"ccde97300d0ad936ec66fd90ca0401d7b19978bc","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars0.githubusercontent.com/u/1609975?v=4","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":8300662,"name":"markdown","full_name":"dart-lang/markdown","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars0.githubusercontent.com/u/1609975?v=4","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/markdown","description":"A Dart markdown library","fork":false,"url":"https://api.github.com/repos/dart-lang/markdown","forks_url":"https://api.github.com/repos/dart-lang/markdown/forks","keys_url":"https://api.github.com/repos/dart-lang/markdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/markdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/markdown/teams","hooks_url":"https://api.github.com/repos/dart-lang/markdown/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/markdown/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/markdown/events","assignees_url":"https://api.github.com/repos/dart-lang/markdown/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/markdown/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/markdown/tags","blobs_url":"https://api.github.com/repos/dart-lang/markdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/markdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/markdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/markdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/markdown/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/markdown/languages","stargazers_url":"https://api.github.com/repos/dart-lang/markdown/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/markdown/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/markdown/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/markdown/subscription","commits_url":"https://api.github.com/repos/dart-lang/markdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/markdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/markdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/markdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/markdown/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/markdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/markdown/merges","archive_url":"https://api.github.com/repos/dart-lang/markdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/markdown/downloads","issues_url":"https://api.github.com/repos/dart-lang/markdown/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/markdown/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/markdown/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/markdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/markdown/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/markdown/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/markdown/deployments","created_at":"2013-02-19T22:11:04Z","updated_at":"2018-04-28T07:37:21Z","pushed_at":"2018-04-30T03:49:06Z","git_url":"git://github.com/dart-lang/markdown.git","ssh_url":"git@github.com:dart-lang/markdown.git","clone_url":"https://github.com/dart-lang/markdown.git","svn_url":"https://github.com/dart-lang/markdown","homepage":"https://pub.dartlang.org/packages/markdown","size":2383,"stargazers_count":76,"watchers_count":76,"language":"Dart","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":33,"open_issues":9,"watchers":76,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dart-lang/markdown/pulls/218"},"html":{"href":"https://github.com/dart-lang/markdown/pull/218"},"issue":{"href":"https://api.github.com/repos/dart-lang/markdown/issues/218"},"comments":{"href":"https://api.github.com/repos/dart-lang/markdown/issues/218/comments"},"review_comments":{"href":"https://api.github.com/repos/dart-lang/markdown/pulls/218/comments"},"review_comment":{"href":"https://api.github.com/repos/dart-lang/markdown/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dart-lang/markdown/pulls/218/commits"},"statuses":{"href":"https://api.github.com/repos/dart-lang/markdown/statuses/d4803f7cae19a0e66432f15777902581ec7669bb"}},"author_association":"NONE"}}
{"actor":{"display_login":"westy92"}}