{"action":"created","comment":{"url":"https://api.github.com/repos/Khan/KaTeX/pulls/comments/187688201","pull_request_review_id":119525235,"id":187688201,"diff_hunk":"@@ -0,0 +1,56 @@\n+//@flow\n+// Row breaks within tabular environments, and line breaks at top level\n+\n+import defineFunction from \"../defineFunction\";\n+import buildCommon from \"../buildCommon\";\n+import mathMLTree from \"../mathMLTree\";\n+import { calculateSize } from \"../units\";\n+import ParseError from \"../ParseError\";\n+\n+defineFunction({\n+    type: \"cr\",\n+    names: [\"\\\\\\\\\", \"\\\\cr\", \"\\\\newline\"],\n+    props: {\n+        numArgs: 0,\n+        numOptionalArgs: 1,\n+        argTypes: [\"size\"],\n+        allowedInText: true,\n+    },\n+\n+    handler: (context, args, optArgs) => {\n+        return {\n+            type: \"cr\",\n+            // \\\\ and \\cr both end the row in a tabular environment\n+            newRow: context.funcName !== \"\\\\newline\",","path":"src/functions/cr.js","position":24,"original_position":24,"commit_id":"f72d8f0930ac3736fb8d73c9b2bd26f9abf56fd2","original_commit_id":"f72d8f0930ac3736fb8d73c9b2bd26f9abf56fd2","user":{"login":"edemaine","id":2218736,"avatar_url":"https://avatars1.githubusercontent.com/u/2218736?v=4","gravatar_id":"","url":"https://api.github.com/users/edemaine","html_url":"https://github.com/edemaine","followers_url":"https://api.github.com/users/edemaine/followers","following_url":"https://api.github.com/users/edemaine/following{/other_user}","gists_url":"https://api.github.com/users/edemaine/gists{/gist_id}","starred_url":"https://api.github.com/users/edemaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edemaine/subscriptions","organizations_url":"https://api.github.com/users/edemaine/orgs","repos_url":"https://api.github.com/users/edemaine/repos","events_url":"https://api.github.com/users/edemaine/events{/privacy}","received_events_url":"https://api.github.com/users/edemaine/received_events","type":"User","site_admin":false},"body":"It's never used. I expected to want it in `environments/array.js`, but that explicitly checks for `\\\\` or `\\cr` without thinking of it as a function, so this isn't needed there.  I could remove it.  Preference?","created_at":"2018-05-11T17:57:10Z","updated_at":"2018-05-11T17:57:11Z","html_url":"https://github.com/Khan/KaTeX/pull/1298#discussion_r187688201","pull_request_url":"https://api.github.com/repos/Khan/KaTeX/pulls/1298","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Khan/KaTeX/pulls/comments/187688201"},"html":{"href":"https://github.com/Khan/KaTeX/pull/1298#discussion_r187688201"},"pull_request":{"href":"https://api.github.com/repos/Khan/KaTeX/pulls/1298"}},"in_reply_to_id":187667305},"pull_request":{"url":"https://api.github.com/repos/Khan/KaTeX/pulls/1298","id":186783374,"html_url":"https://github.com/Khan/KaTeX/pull/1298","diff_url":"https://github.com/Khan/KaTeX/pull/1298.diff","patch_url":"https://github.com/Khan/KaTeX/pull/1298.patch","issue_url":"https://api.github.com/repos/Khan/KaTeX/issues/1298","number":1298,"state":"open","locked":false,"title":"Support for top-level \\newline and \\\\ in inline math","user":{"login":"edemaine","id":2218736,"avatar_url":"https://avatars1.githubusercontent.com/u/2218736?v=4","gravatar_id":"","url":"https://api.github.com/users/edemaine","html_url":"https://github.com/edemaine","followers_url":"https://api.github.com/users/edemaine/followers","following_url":"https://api.github.com/users/edemaine/following{/other_user}","gists_url":"https://api.github.com/users/edemaine/gists{/gist_id}","starred_url":"https://api.github.com/users/edemaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edemaine/subscriptions","organizations_url":"https://api.github.com/users/edemaine/orgs","repos_url":"https://api.github.com/users/edemaine/repos","events_url":"https://api.github.com/users/edemaine/events{/privacy}","received_events_url":"https://api.github.com/users/edemaine/received_events","type":"User","site_admin":false},"body":"Built on top of #1287, so blocked on that.  Fix #171.\r\n\r\nThis was a little tricky because `\\\\` was defined as an `endOfExpression`.  Instead made `\\\\` a termination specific to an array environment.\r\n\r\nOutside an array environment, buildHTML handles the `cr` object, resulting in a `.newline` class.\r\n\r\nCurrently this turns into a `display: block` (with appropriate vertical spacing) only in inline math, matching LaTeX behavior.  But we should consider always turning into a `display: block`, maybe only at the top level, at least in nonstrict mode...\r\n\r\nDemo:\r\n\r\n![image](https://user-images.githubusercontent.com/2218736/39788390-4d6b67d2-52f8-11e8-89cc-5a4ca3bb3804.png)\r\n\r\nWith optional argument:\r\n\r\n![image](https://user-images.githubusercontent.com/2218736/39788403-59e6f530-52f8-11e8-97a5-0552d7302b5e.png)\r\n","created_at":"2018-05-08T23:39:34Z","updated_at":"2018-05-11T17:57:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0528cb4ed3337ace6df0903dec27cd386f14c903","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":255328091,"url":"https://api.github.com/repos/Khan/KaTeX/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Khan/KaTeX/pulls/1298/commits","review_comments_url":"https://api.github.com/repos/Khan/KaTeX/pulls/1298/comments","review_comment_url":"https://api.github.com/repos/Khan/KaTeX/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Khan/KaTeX/issues/1298/comments","statuses_url":"https://api.github.com/repos/Khan/KaTeX/statuses/f72d8f0930ac3736fb8d73c9b2bd26f9abf56fd2","head":{"label":"edemaine:newline","ref":"newline","sha":"f72d8f0930ac3736fb8d73c9b2bd26f9abf56fd2","user":{"login":"edemaine","id":2218736,"avatar_url":"https://avatars1.githubusercontent.com/u/2218736?v=4","gravatar_id":"","url":"https://api.github.com/users/edemaine","html_url":"https://github.com/edemaine","followers_url":"https://api.github.com/users/edemaine/followers","following_url":"https://api.github.com/users/edemaine/following{/other_user}","gists_url":"https://api.github.com/users/edemaine/gists{/gist_id}","starred_url":"https://api.github.com/users/edemaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edemaine/subscriptions","organizations_url":"https://api.github.com/users/edemaine/orgs","repos_url":"https://api.github.com/users/edemaine/repos","events_url":"https://api.github.com/users/edemaine/events{/privacy}","received_events_url":"https://api.github.com/users/edemaine/received_events","type":"User","site_admin":false},"repo":{"id":77924636,"name":"KaTeX","full_name":"edemaine/KaTeX","owner":{"login":"edemaine","id":2218736,"avatar_url":"https://avatars1.githubusercontent.com/u/2218736?v=4","gravatar_id":"","url":"https://api.github.com/users/edemaine","html_url":"https://github.com/edemaine","followers_url":"https://api.github.com/users/edemaine/followers","following_url":"https://api.github.com/users/edemaine/following{/other_user}","gists_url":"https://api.github.com/users/edemaine/gists{/gist_id}","starred_url":"https://api.github.com/users/edemaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edemaine/subscriptions","organizations_url":"https://api.github.com/users/edemaine/orgs","repos_url":"https://api.github.com/users/edemaine/repos","events_url":"https://api.github.com/users/edemaine/events{/privacy}","received_events_url":"https://api.github.com/users/edemaine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edemaine/KaTeX","description":"Fast math typesetting for the web.","fork":true,"url":"https://api.github.com/repos/edemaine/KaTeX","forks_url":"https://api.github.com/repos/edemaine/KaTeX/forks","keys_url":"https://api.github.com/repos/edemaine/KaTeX/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edemaine/KaTeX/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edemaine/KaTeX/teams","hooks_url":"https://api.github.com/repos/edemaine/KaTeX/hooks","issue_events_url":"https://api.github.com/repos/edemaine/KaTeX/issues/events{/number}","events_url":"https://api.github.com/repos/edemaine/KaTeX/events","assignees_url":"https://api.github.com/repos/edemaine/KaTeX/assignees{/user}","branches_url":"https://api.github.com/repos/edemaine/KaTeX/branches{/branch}","tags_url":"https://api.github.com/repos/edemaine/KaTeX/tags","blobs_url":"https://api.github.com/repos/edemaine/KaTeX/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edemaine/KaTeX/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edemaine/KaTeX/git/refs{/sha}","trees_url":"https://api.github.com/repos/edemaine/KaTeX/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edemaine/KaTeX/statuses/{sha}","languages_url":"https://api.github.com/repos/edemaine/KaTeX/languages","stargazers_url":"https://api.github.com/repos/edemaine/KaTeX/stargazers","contributors_url":"https://api.github.com/repos/edemaine/KaTeX/contributors","subscribers_url":"https://api.github.com/repos/edemaine/KaTeX/subscribers","subscription_url":"https://api.github.com/repos/edemaine/KaTeX/subscription","commits_url":"https://api.github.com/repos/edemaine/KaTeX/commits{/sha}","git_commits_url":"https://api.github.com/repos/edemaine/KaTeX/git/commits{/sha}","comments_url":"https://api.github.com/repos/edemaine/KaTeX/comments{/number}","issue_comment_url":"https://api.github.com/repos/edemaine/KaTeX/issues/comments{/number}","contents_url":"https://api.github.com/repos/edemaine/KaTeX/contents/{+path}","compare_url":"https://api.github.com/repos/edemaine/KaTeX/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edemaine/KaTeX/merges","archive_url":"https://api.github.com/repos/edemaine/KaTeX/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edemaine/KaTeX/downloads","issues_url":"https://api.github.com/repos/edemaine/KaTeX/issues{/number}","pulls_url":"https://api.github.com/repos/edemaine/KaTeX/pulls{/number}","milestones_url":"https://api.github.com/repos/edemaine/KaTeX/milestones{/number}","notifications_url":"https://api.github.com/repos/edemaine/KaTeX/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edemaine/KaTeX/labels{/name}","releases_url":"https://api.github.com/repos/edemaine/KaTeX/releases{/id}","deployments_url":"https://api.github.com/repos/edemaine/KaTeX/deployments","created_at":"2017-01-03T14:34:12Z","updated_at":"2018-02-14T07:30:19Z","pushed_at":"2018-05-11T13:52:12Z","git_url":"git://github.com/edemaine/KaTeX.git","ssh_url":"git@github.com:edemaine/KaTeX.git","clone_url":"https://github.com/edemaine/KaTeX.git","svn_url":"https://github.com/edemaine/KaTeX","homepage":"https://khan.github.io/KaTeX/","size":27392,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Khan:master","ref":"master","sha":"9bb48b83f16382271906a7ec77a597466126e436","user":{"login":"Khan","id":15455,"avatar_url":"https://avatars1.githubusercontent.com/u/15455?v=4","gravatar_id":"","url":"https://api.github.com/users/Khan","html_url":"https://github.com/Khan","followers_url":"https://api.github.com/users/Khan/followers","following_url":"https://api.github.com/users/Khan/following{/other_user}","gists_url":"https://api.github.com/users/Khan/gists{/gist_id}","starred_url":"https://api.github.com/users/Khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khan/subscriptions","organizations_url":"https://api.github.com/users/Khan/orgs","repos_url":"https://api.github.com/users/Khan/repos","events_url":"https://api.github.com/users/Khan/events{/privacy}","received_events_url":"https://api.github.com/users/Khan/received_events","type":"Organization","site_admin":false},"repo":{"id":11195700,"name":"KaTeX","full_name":"Khan/KaTeX","owner":{"login":"Khan","id":15455,"avatar_url":"https://avatars1.githubusercontent.com/u/15455?v=4","gravatar_id":"","url":"https://api.github.com/users/Khan","html_url":"https://github.com/Khan","followers_url":"https://api.github.com/users/Khan/followers","following_url":"https://api.github.com/users/Khan/following{/other_user}","gists_url":"https://api.github.com/users/Khan/gists{/gist_id}","starred_url":"https://api.github.com/users/Khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khan/subscriptions","organizations_url":"https://api.github.com/users/Khan/orgs","repos_url":"https://api.github.com/users/Khan/repos","events_url":"https://api.github.com/users/Khan/events{/privacy}","received_events_url":"https://api.github.com/users/Khan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Khan/KaTeX","description":"Fast math typesetting for the web.","fork":false,"url":"https://api.github.com/repos/Khan/KaTeX","forks_url":"https://api.github.com/repos/Khan/KaTeX/forks","keys_url":"https://api.github.com/repos/Khan/KaTeX/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Khan/KaTeX/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Khan/KaTeX/teams","hooks_url":"https://api.github.com/repos/Khan/KaTeX/hooks","issue_events_url":"https://api.github.com/repos/Khan/KaTeX/issues/events{/number}","events_url":"https://api.github.com/repos/Khan/KaTeX/events","assignees_url":"https://api.github.com/repos/Khan/KaTeX/assignees{/user}","branches_url":"https://api.github.com/repos/Khan/KaTeX/branches{/branch}","tags_url":"https://api.github.com/repos/Khan/KaTeX/tags","blobs_url":"https://api.github.com/repos/Khan/KaTeX/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Khan/KaTeX/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Khan/KaTeX/git/refs{/sha}","trees_url":"https://api.github.com/repos/Khan/KaTeX/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Khan/KaTeX/statuses/{sha}","languages_url":"https://api.github.com/repos/Khan/KaTeX/languages","stargazers_url":"https://api.github.com/repos/Khan/KaTeX/stargazers","contributors_url":"https://api.github.com/repos/Khan/KaTeX/contributors","subscribers_url":"https://api.github.com/repos/Khan/KaTeX/subscribers","subscription_url":"https://api.github.com/repos/Khan/KaTeX/subscription","commits_url":"https://api.github.com/repos/Khan/KaTeX/commits{/sha}","git_commits_url":"https://api.github.com/repos/Khan/KaTeX/git/commits{/sha}","comments_url":"https://api.github.com/repos/Khan/KaTeX/comments{/number}","issue_comment_url":"https://api.github.com/repos/Khan/KaTeX/issues/comments{/number}","contents_url":"https://api.github.com/repos/Khan/KaTeX/contents/{+path}","compare_url":"https://api.github.com/repos/Khan/KaTeX/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Khan/KaTeX/merges","archive_url":"https://api.github.com/repos/Khan/KaTeX/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Khan/KaTeX/downloads","issues_url":"https://api.github.com/repos/Khan/KaTeX/issues{/number}","pulls_url":"https://api.github.com/repos/Khan/KaTeX/pulls{/number}","milestones_url":"https://api.github.com/repos/Khan/KaTeX/milestones{/number}","notifications_url":"https://api.github.com/repos/Khan/KaTeX/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Khan/KaTeX/labels{/name}","releases_url":"https://api.github.com/repos/Khan/KaTeX/releases{/id}","deployments_url":"https://api.github.com/repos/Khan/KaTeX/deployments","created_at":"2013-07-05T09:01:54Z","updated_at":"2018-05-11T15:57:48Z","pushed_at":"2018-05-11T17:17:31Z","git_url":"git://github.com/Khan/KaTeX.git","ssh_url":"git@github.com:Khan/KaTeX.git","clone_url":"https://github.com/Khan/KaTeX.git","svn_url":"https://github.com/Khan/KaTeX","homepage":"https://khan.github.io/KaTeX/","size":27495,"stargazers_count":8234,"watchers_count":8234,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":573,"mirror_url":null,"archived":false,"open_issues_count":197,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":573,"open_issues":197,"watchers":8234,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Khan/KaTeX/pulls/1298"},"html":{"href":"https://github.com/Khan/KaTeX/pull/1298"},"issue":{"href":"https://api.github.com/repos/Khan/KaTeX/issues/1298"},"comments":{"href":"https://api.github.com/repos/Khan/KaTeX/issues/1298/comments"},"review_comments":{"href":"https://api.github.com/repos/Khan/KaTeX/pulls/1298/comments"},"review_comment":{"href":"https://api.github.com/repos/Khan/KaTeX/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Khan/KaTeX/pulls/1298/commits"},"statuses":{"href":"https://api.github.com/repos/Khan/KaTeX/statuses/f72d8f0930ac3736fb8d73c9b2bd26f9abf56fd2"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"edemaine"}}