{"action":"created","issue":{"url":"https://api.github.com/repos/Khan/KaTeX/issues/345","labels_url":"https://api.github.com/repos/Khan/KaTeX/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/Khan/KaTeX/issues/345/comments","events_url":"https://api.github.com/repos/Khan/KaTeX/issues/345/events","html_url":"https://github.com/Khan/KaTeX/pull/345","id":105753980,"number":345,"title":"Split up functions list into calls to declareFunction","user":{"login":"gagern","id":190759,"avatar_url":"https://avatars.githubusercontent.com/u/190759?v=3","gravatar_id":"","url":"https://api.github.com/users/gagern","html_url":"https://github.com/gagern","followers_url":"https://api.github.com/users/gagern/followers","following_url":"https://api.github.com/users/gagern/following{/other_user}","gists_url":"https://api.github.com/users/gagern/gists{/gist_id}","starred_url":"https://api.github.com/users/gagern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagern/subscriptions","organizations_url":"https://api.github.com/users/gagern/orgs","repos_url":"https://api.github.com/users/gagern/repos","events_url":"https://api.github.com/users/gagern/events{/privacy}","received_events_url":"https://api.github.com/users/gagern/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-10T08:01:42Z","updated_at":"2015-09-11T05:04:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Khan/KaTeX/pulls/345","html_url":"https://github.com/Khan/KaTeX/pull/345","diff_url":"https://github.com/Khan/KaTeX/pull/345.diff","patch_url":"https://github.com/Khan/KaTeX/pull/345.patch"},"body":"This is one part of #262, discussed in #256.\r\n\r\nHaving one long array literal to contain the code of all function implementations is problematic.  It makes it difficult to add auxiliary functions or data close to the function inside the list where it is needed.\r\n\r\nNow the functions are no longer defined using such a literal, but instead using calls to a `declareFunction` function which receives all the relevant data.  Since each function call is independent from the others, anything can go in between.\r\n\r\nI've deliberately submitted this as three distinct commits. The first gets rid of one level of indirection, replacing `functions.funcs` by just `functions`. The second does the actual work, but avoids reindentation, while the third does the reindentation but has no other changes. Hopefully this will make reviewing easier."},"comment":{"url":"https://api.github.com/repos/Khan/KaTeX/issues/comments/139453179","html_url":"https://github.com/Khan/KaTeX/pull/345#issuecomment-139453179","issue_url":"https://api.github.com/repos/Khan/KaTeX/issues/345","id":139453179,"user":{"login":"kevinb7","id":1044413,"avatar_url":"https://avatars.githubusercontent.com/u/1044413?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinb7","html_url":"https://github.com/kevinb7","followers_url":"https://api.github.com/users/kevinb7/followers","following_url":"https://api.github.com/users/kevinb7/following{/other_user}","gists_url":"https://api.github.com/users/kevinb7/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinb7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinb7/subscriptions","organizations_url":"https://api.github.com/users/kevinb7/orgs","repos_url":"https://api.github.com/users/kevinb7/repos","events_url":"https://api.github.com/users/kevinb7/events{/privacy}","received_events_url":"https://api.github.com/users/kevinb7/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T05:04:20Z","updated_at":"2015-09-11T05:04:20Z","body":"I will have a closer look at this this weekend.  Looking at the combined diff isn't too bad with `?w=1` https://github.com/Khan/KaTeX/pull/345/files?w=1"}}