{"action":"created","comment":{"url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/comments/37092023","id":37092023,"diff_hunk":"@@ -2032,18 +2032,15 @@ WYMeditor.editor.prototype.paste = function (str) {\n WYMeditor.editor.prototype.insert = function (html) {\n     // Do we have a selection?\n     var wym = this,\n-        selection = wym.selection(),\n+        selection = wym.hasSelection() ? wym.selection() : false,","path":"src/wymeditor/editor/base.js","position":5,"original_position":5,"commit_id":"b1e7f28d8e855004aa9ef39f7dfda17ddd8bae97","original_commit_id":"2e045255e4f1986f9f9a31dad26b27761864ceb1","user":{"login":"kylegibson","id":243791,"avatar_url":"https://avatars.githubusercontent.com/u/243791?v=3","gravatar_id":"","url":"https://api.github.com/users/kylegibson","html_url":"https://github.com/kylegibson","followers_url":"https://api.github.com/users/kylegibson/followers","following_url":"https://api.github.com/users/kylegibson/following{/other_user}","gists_url":"https://api.github.com/users/kylegibson/gists{/gist_id}","starred_url":"https://api.github.com/users/kylegibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylegibson/subscriptions","organizations_url":"https://api.github.com/users/kylegibson/orgs","repos_url":"https://api.github.com/users/kylegibson/repos","events_url":"https://api.github.com/users/kylegibson/events{/privacy}","received_events_url":"https://api.github.com/users/kylegibson/received_events","type":"User","site_admin":false},"body":"Is the ternary operator consistent with wymeditor javascript coding style guidelines? I know we try to avoid it in PolicyStat code, since it doesn't improve code readability, and frequently reduces it. I don't have a strong preference on this. ","created_at":"2015-08-14T16:11:40Z","updated_at":"2015-08-14T16:11:40Z","html_url":"https://github.com/wymeditor/wymeditor/pull/730#discussion_r37092023","pull_request_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/730","_links":{"self":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/comments/37092023"},"html":{"href":"https://github.com/wymeditor/wymeditor/pull/730#discussion_r37092023"},"pull_request":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/730"}}},"pull_request":{"url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/730","id":42393560,"html_url":"https://github.com/wymeditor/wymeditor/pull/730","diff_url":"https://github.com/wymeditor/wymeditor/pull/730.diff","patch_url":"https://github.com/wymeditor/wymeditor/pull/730.patch","issue_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/730","number":730,"state":"open","locked":false,"title":"`insert` inconsistent across browsers","user":{"login":"mightyiam","id":635591,"avatar_url":"https://avatars.githubusercontent.com/u/635591?v=3","gravatar_id":"","url":"https://api.github.com/users/mightyiam","html_url":"https://github.com/mightyiam","followers_url":"https://api.github.com/users/mightyiam/followers","following_url":"https://api.github.com/users/mightyiam/following{/other_user}","gists_url":"https://api.github.com/users/mightyiam/gists{/gist_id}","starred_url":"https://api.github.com/users/mightyiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightyiam/subscriptions","organizations_url":"https://api.github.com/users/mightyiam/orgs","repos_url":"https://api.github.com/users/mightyiam/repos","events_url":"https://api.github.com/users/mightyiam/events{/privacy}","received_events_url":"https://api.github.com/users/mightyiam/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-08-13T20:12:55Z","updated_at":"2015-08-14T16:11:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7eb92d4fbee1e160cf8cd298902270adea177288","assignee":{"login":"mightyiam","id":635591,"avatar_url":"https://avatars.githubusercontent.com/u/635591?v=3","gravatar_id":"","url":"https://api.github.com/users/mightyiam","html_url":"https://github.com/mightyiam","followers_url":"https://api.github.com/users/mightyiam/followers","following_url":"https://api.github.com/users/mightyiam/following{/other_user}","gists_url":"https://api.github.com/users/mightyiam/gists{/gist_id}","starred_url":"https://api.github.com/users/mightyiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightyiam/subscriptions","organizations_url":"https://api.github.com/users/mightyiam/orgs","repos_url":"https://api.github.com/users/mightyiam/repos","events_url":"https://api.github.com/users/mightyiam/events{/privacy}","received_events_url":"https://api.github.com/users/mightyiam/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/wymeditor/wymeditor/milestones/17","html_url":"https://github.com/wymeditor/wymeditor/milestones/Next","labels_url":"https://api.github.com/repos/wymeditor/wymeditor/milestones/17/labels","id":837105,"number":17,"title":"Next","description":"","creator":{"login":"mightyiam","id":635591,"avatar_url":"https://avatars.githubusercontent.com/u/635591?v=3","gravatar_id":"","url":"https://api.github.com/users/mightyiam","html_url":"https://github.com/mightyiam","followers_url":"https://api.github.com/users/mightyiam/followers","following_url":"https://api.github.com/users/mightyiam/following{/other_user}","gists_url":"https://api.github.com/users/mightyiam/gists{/gist_id}","starred_url":"https://api.github.com/users/mightyiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightyiam/subscriptions","organizations_url":"https://api.github.com/users/mightyiam/orgs","repos_url":"https://api.github.com/users/mightyiam/repos","events_url":"https://api.github.com/users/mightyiam/events{/privacy}","received_events_url":"https://api.github.com/users/mightyiam/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":8,"state":"open","created_at":"2014-10-23T08:58:05Z","updated_at":"2015-08-13T21:03:55Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/730/commits","review_comments_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/730/comments","review_comment_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/730/comments","statuses_url":"https://api.github.com/repos/wymeditor/wymeditor/statuses/b1e7f28d8e855004aa9ef39f7dfda17ddd8bae97","head":{"label":"wymeditor:issue_730","ref":"issue_730","sha":"b1e7f28d8e855004aa9ef39f7dfda17ddd8bae97","user":{"login":"wymeditor","id":187598,"avatar_url":"https://avatars.githubusercontent.com/u/187598?v=3","gravatar_id":"","url":"https://api.github.com/users/wymeditor","html_url":"https://github.com/wymeditor","followers_url":"https://api.github.com/users/wymeditor/followers","following_url":"https://api.github.com/users/wymeditor/following{/other_user}","gists_url":"https://api.github.com/users/wymeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/wymeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wymeditor/subscriptions","organizations_url":"https://api.github.com/users/wymeditor/orgs","repos_url":"https://api.github.com/users/wymeditor/repos","events_url":"https://api.github.com/users/wymeditor/events{/privacy}","received_events_url":"https://api.github.com/users/wymeditor/received_events","type":"Organization","site_admin":false},"repo":{"id":483659,"name":"wymeditor","full_name":"wymeditor/wymeditor","owner":{"login":"wymeditor","id":187598,"avatar_url":"https://avatars.githubusercontent.com/u/187598?v=3","gravatar_id":"","url":"https://api.github.com/users/wymeditor","html_url":"https://github.com/wymeditor","followers_url":"https://api.github.com/users/wymeditor/followers","following_url":"https://api.github.com/users/wymeditor/following{/other_user}","gists_url":"https://api.github.com/users/wymeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/wymeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wymeditor/subscriptions","organizations_url":"https://api.github.com/users/wymeditor/orgs","repos_url":"https://api.github.com/users/wymeditor/repos","events_url":"https://api.github.com/users/wymeditor/events{/privacy}","received_events_url":"https://api.github.com/users/wymeditor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wymeditor/wymeditor","description":"Pure js cross-browser WYSIWYM editor with a focus on the clean separation of content and styling.","fork":false,"url":"https://api.github.com/repos/wymeditor/wymeditor","forks_url":"https://api.github.com/repos/wymeditor/wymeditor/forks","keys_url":"https://api.github.com/repos/wymeditor/wymeditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wymeditor/wymeditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wymeditor/wymeditor/teams","hooks_url":"https://api.github.com/repos/wymeditor/wymeditor/hooks","issue_events_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/events{/number}","events_url":"https://api.github.com/repos/wymeditor/wymeditor/events","assignees_url":"https://api.github.com/repos/wymeditor/wymeditor/assignees{/user}","branches_url":"https://api.github.com/repos/wymeditor/wymeditor/branches{/branch}","tags_url":"https://api.github.com/repos/wymeditor/wymeditor/tags","blobs_url":"https://api.github.com/repos/wymeditor/wymeditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wymeditor/wymeditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wymeditor/wymeditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/wymeditor/wymeditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wymeditor/wymeditor/statuses/{sha}","languages_url":"https://api.github.com/repos/wymeditor/wymeditor/languages","stargazers_url":"https://api.github.com/repos/wymeditor/wymeditor/stargazers","contributors_url":"https://api.github.com/repos/wymeditor/wymeditor/contributors","subscribers_url":"https://api.github.com/repos/wymeditor/wymeditor/subscribers","subscription_url":"https://api.github.com/repos/wymeditor/wymeditor/subscription","commits_url":"https://api.github.com/repos/wymeditor/wymeditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/wymeditor/wymeditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/wymeditor/wymeditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/comments{/number}","contents_url":"https://api.github.com/repos/wymeditor/wymeditor/contents/{+path}","compare_url":"https://api.github.com/repos/wymeditor/wymeditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wymeditor/wymeditor/merges","archive_url":"https://api.github.com/repos/wymeditor/wymeditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wymeditor/wymeditor/downloads","issues_url":"https://api.github.com/repos/wymeditor/wymeditor/issues{/number}","pulls_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls{/number}","milestones_url":"https://api.github.com/repos/wymeditor/wymeditor/milestones{/number}","notifications_url":"https://api.github.com/repos/wymeditor/wymeditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wymeditor/wymeditor/labels{/name}","releases_url":"https://api.github.com/repos/wymeditor/wymeditor/releases{/id}","created_at":"2010-01-22T10:50:59Z","updated_at":"2015-08-11T08:19:49Z","pushed_at":"2015-08-13T21:12:21Z","git_url":"git://github.com/wymeditor/wymeditor.git","ssh_url":"git@github.com:wymeditor/wymeditor.git","clone_url":"https://github.com/wymeditor/wymeditor.git","svn_url":"https://github.com/wymeditor/wymeditor","homepage":"http://wymeditor.github.io/wymeditor/","size":16972,"stargazers_count":509,"watchers_count":509,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":96,"mirror_url":null,"open_issues_count":122,"forks":96,"open_issues":122,"watchers":509,"default_branch":"master"}},"base":{"label":"wymeditor:master","ref":"master","sha":"3bd86470c6051de01a34b6b350bbca08e795d228","user":{"login":"wymeditor","id":187598,"avatar_url":"https://avatars.githubusercontent.com/u/187598?v=3","gravatar_id":"","url":"https://api.github.com/users/wymeditor","html_url":"https://github.com/wymeditor","followers_url":"https://api.github.com/users/wymeditor/followers","following_url":"https://api.github.com/users/wymeditor/following{/other_user}","gists_url":"https://api.github.com/users/wymeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/wymeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wymeditor/subscriptions","organizations_url":"https://api.github.com/users/wymeditor/orgs","repos_url":"https://api.github.com/users/wymeditor/repos","events_url":"https://api.github.com/users/wymeditor/events{/privacy}","received_events_url":"https://api.github.com/users/wymeditor/received_events","type":"Organization","site_admin":false},"repo":{"id":483659,"name":"wymeditor","full_name":"wymeditor/wymeditor","owner":{"login":"wymeditor","id":187598,"avatar_url":"https://avatars.githubusercontent.com/u/187598?v=3","gravatar_id":"","url":"https://api.github.com/users/wymeditor","html_url":"https://github.com/wymeditor","followers_url":"https://api.github.com/users/wymeditor/followers","following_url":"https://api.github.com/users/wymeditor/following{/other_user}","gists_url":"https://api.github.com/users/wymeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/wymeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wymeditor/subscriptions","organizations_url":"https://api.github.com/users/wymeditor/orgs","repos_url":"https://api.github.com/users/wymeditor/repos","events_url":"https://api.github.com/users/wymeditor/events{/privacy}","received_events_url":"https://api.github.com/users/wymeditor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wymeditor/wymeditor","description":"Pure js cross-browser WYSIWYM editor with a focus on the clean separation of content and styling.","fork":false,"url":"https://api.github.com/repos/wymeditor/wymeditor","forks_url":"https://api.github.com/repos/wymeditor/wymeditor/forks","keys_url":"https://api.github.com/repos/wymeditor/wymeditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wymeditor/wymeditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wymeditor/wymeditor/teams","hooks_url":"https://api.github.com/repos/wymeditor/wymeditor/hooks","issue_events_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/events{/number}","events_url":"https://api.github.com/repos/wymeditor/wymeditor/events","assignees_url":"https://api.github.com/repos/wymeditor/wymeditor/assignees{/user}","branches_url":"https://api.github.com/repos/wymeditor/wymeditor/branches{/branch}","tags_url":"https://api.github.com/repos/wymeditor/wymeditor/tags","blobs_url":"https://api.github.com/repos/wymeditor/wymeditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wymeditor/wymeditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wymeditor/wymeditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/wymeditor/wymeditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wymeditor/wymeditor/statuses/{sha}","languages_url":"https://api.github.com/repos/wymeditor/wymeditor/languages","stargazers_url":"https://api.github.com/repos/wymeditor/wymeditor/stargazers","contributors_url":"https://api.github.com/repos/wymeditor/wymeditor/contributors","subscribers_url":"https://api.github.com/repos/wymeditor/wymeditor/subscribers","subscription_url":"https://api.github.com/repos/wymeditor/wymeditor/subscription","commits_url":"https://api.github.com/repos/wymeditor/wymeditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/wymeditor/wymeditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/wymeditor/wymeditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/comments{/number}","contents_url":"https://api.github.com/repos/wymeditor/wymeditor/contents/{+path}","compare_url":"https://api.github.com/repos/wymeditor/wymeditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wymeditor/wymeditor/merges","archive_url":"https://api.github.com/repos/wymeditor/wymeditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wymeditor/wymeditor/downloads","issues_url":"https://api.github.com/repos/wymeditor/wymeditor/issues{/number}","pulls_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls{/number}","milestones_url":"https://api.github.com/repos/wymeditor/wymeditor/milestones{/number}","notifications_url":"https://api.github.com/repos/wymeditor/wymeditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wymeditor/wymeditor/labels{/name}","releases_url":"https://api.github.com/repos/wymeditor/wymeditor/releases{/id}","created_at":"2010-01-22T10:50:59Z","updated_at":"2015-08-11T08:19:49Z","pushed_at":"2015-08-13T21:12:21Z","git_url":"git://github.com/wymeditor/wymeditor.git","ssh_url":"git@github.com:wymeditor/wymeditor.git","clone_url":"https://github.com/wymeditor/wymeditor.git","svn_url":"https://github.com/wymeditor/wymeditor","homepage":"http://wymeditor.github.io/wymeditor/","size":16972,"stargazers_count":509,"watchers_count":509,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":96,"mirror_url":null,"open_issues_count":122,"forks":96,"open_issues":122,"watchers":509,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/730"},"html":{"href":"https://github.com/wymeditor/wymeditor/pull/730"},"issue":{"href":"https://api.github.com/repos/wymeditor/wymeditor/issues/730"},"comments":{"href":"https://api.github.com/repos/wymeditor/wymeditor/issues/730/comments"},"review_comments":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/730/comments"},"review_comment":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/730/commits"},"statuses":{"href":"https://api.github.com/repos/wymeditor/wymeditor/statuses/b1e7f28d8e855004aa9ef39f7dfda17ddd8bae97"}}}}