{"action":"created","comment":{"url":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/comments/117717203","pull_request_review_id":39445007,"id":117717203,"diff_hunk":"@@ -0,0 +1,401 @@\n+/*************************************************************\n+ *\n+ *  Copyright (c) 2017 The MathJax Consortium\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+/**\n+ * @fileoverview  Implements the interface and abstract class for MathDocument objects\n+ *\n+ * @author dpvc@mathjax.org (Davide Cervone)\n+ */\n+\n+import {userOptions, defaultOptions, OptionList} from '../util/Options.js';\n+import {InputJax, AbstractInputJax} from './InputJax.js';\n+import {OutputJax, AbstractOutputJax} from './OutputJax.js';\n+import {MathList, MathListClass, AbstractMathList} from './MathList.js';\n+import {MathItem, AbstractMathItem} from './MathItem.js';\n+\n+/*****************************************************************/\n+/*\n+ *  The MathDocument interface\n+ *\n+ *  The MathDocument is created by MathJax.Document() and holds the\n+ *  document, the math found in it, and so on.  The methods of the\n+ *  MathDocument all return the MathDocument itself, so you can\n+ *  chain the method calls.  E.g.,\n+ *\n+ *    const html = MathJax.Document('<html>...</html>');\n+ *    html.findMath()\n+ *        .compile()\n+ *        .getMetrics()\n+ *        .typeset()\n+ *        .addEventHandlers()\n+ *        .updateDocument();\n+ *\n+ *  The MathDocument is the main interface for page authors to\n+ *  interact with MathJax.\n+ */\n+\n+export interface MathDocument {\n+    /*\n+     * The document being processed (e.g., DOM document, or Markdown string)\n+     */\n+    document: any;\n+\n+    /*\n+     * The kind of MathDocument (e.g., \"HTML\")\n+     */\n+    kind: string;\n+\n+    /*\n+     * The options for the document\n+     */\n+    options: OptionList;\n+\n+    /*\n+     * The list of MathItems found in this page\n+     */\n+    math: MathList;\n+\n+    /*\n+     * This object tracks what operations have been performed, so that (when\n+     *  asynchronous operations are used), the ones that have already been\n+     *  completed won't be performed again.\n+     */\n+    processed: {[name: string]: boolean};\n+\n+    /*\n+     * An array of input jax to run on the document\n+     */\n+    inputJax: InputJax[];\n+\n+    /*\n+     * The output jax to use for the document\n+     */\n+    outputJax: OutputJax;\n+\n+    /*\n+     * Locates the math in the document and constructs the MathList\n+     *  for the document.\n+     *\n+     * @param{OptionList} options  The options for locating the math\n+     * @return{MathDocument}       The math document instance\n+     */\n+    findMath(options?: OptionList): MathDocument;","path":"v3/mathjax3-ts/core/MathDocument.ts","position":96,"original_position":96,"commit_id":"2e76d08cf358b652cc143f3edd9bde9f8027ca4b","original_commit_id":"2e76d08cf358b652cc143f3edd9bde9f8027ca4b","user":{"login":"dpvc","id":432782,"avatar_url":"https://avatars1.githubusercontent.com/u/432782?v=3","gravatar_id":"","url":"https://api.github.com/users/dpvc","html_url":"https://github.com/dpvc","followers_url":"https://api.github.com/users/dpvc/followers","following_url":"https://api.github.com/users/dpvc/following{/other_user}","gists_url":"https://api.github.com/users/dpvc/gists{/gist_id}","starred_url":"https://api.github.com/users/dpvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpvc/subscriptions","organizations_url":"https://api.github.com/users/dpvc/orgs","repos_url":"https://api.github.com/users/dpvc/repos","events_url":"https://api.github.com/users/dpvc/events{/privacy}","received_events_url":"https://api.github.com/users/dpvc/received_events","type":"User","site_admin":false},"body":"It is more complicated than that.  For one thing, the handler has to create the array of strings from the document for the FindMath object to search, so it is the handler that would call FindMath.  See our email for more.","created_at":"2017-05-22T10:56:38Z","updated_at":"2017-05-22T10:56:38Z","html_url":"https://github.com/mathjax/mathjax-v3/pull/20#discussion_r117717203","pull_request_url":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/comments/117717203"},"html":{"href":"https://github.com/mathjax/mathjax-v3/pull/20#discussion_r117717203"},"pull_request":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/20","id":118165811,"html_url":"https://github.com/mathjax/mathjax-v3/pull/20","diff_url":"https://github.com/mathjax/mathjax-v3/pull/20.diff","patch_url":"https://github.com/mathjax/mathjax-v3/pull/20.patch","issue_url":"https://api.github.com/repos/mathjax/mathjax-v3/issues/20","number":20,"state":"open","locked":false,"title":"Convert ES6 to Typescript","user":{"login":"dpvc","id":432782,"avatar_url":"https://avatars1.githubusercontent.com/u/432782?v=3","gravatar_id":"","url":"https://api.github.com/users/dpvc","html_url":"https://github.com/dpvc","followers_url":"https://api.github.com/users/dpvc/followers","following_url":"https://api.github.com/users/dpvc/following{/other_user}","gists_url":"https://api.github.com/users/dpvc/gists{/gist_id}","starred_url":"https://api.github.com/users/dpvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpvc/subscriptions","organizations_url":"https://api.github.com/users/dpvc/orgs","repos_url":"https://api.github.com/users/dpvc/repos","events_url":"https://api.github.com/users/dpvc/events{/privacy}","received_events_url":"https://api.github.com/users/dpvc/received_events","type":"User","site_admin":false},"body":"This PR translates all the ES6 files to Typescript, and reorganizes the directory structure to accommodate that.  Unfortunately the renaming causes extra complication in the file differences, since they include the removal of the old ones as well as the creation of the new ones.  Not sure how to make that work better at this point.\r\n\r\nThere is now a directory `mathjax2` for the legacy code (non-typescript), and some glue files for accessing it (these weren't translated to Typescript, as they will be going away when everything is converted to v3 anyway).  The `mathjax3` directory contains the compiled javascript output of the typescript, and `mathjax-ts` is where all the typescript files live.","created_at":"2017-04-28T14:34:00Z","updated_at":"2017-05-22T10:56:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e42cf0e1b749cac89105bb866c62afd1a083641","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/20/commits","review_comments_url":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/20/comments","review_comment_url":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mathjax/mathjax-v3/issues/20/comments","statuses_url":"https://api.github.com/repos/mathjax/mathjax-v3/statuses/2e76d08cf358b652cc143f3edd9bde9f8027ca4b","head":{"label":"mathjax:ts-core","ref":"ts-core","sha":"2e76d08cf358b652cc143f3edd9bde9f8027ca4b","user":{"login":"mathjax","id":252187,"avatar_url":"https://avatars2.githubusercontent.com/u/252187?v=3","gravatar_id":"","url":"https://api.github.com/users/mathjax","html_url":"https://github.com/mathjax","followers_url":"https://api.github.com/users/mathjax/followers","following_url":"https://api.github.com/users/mathjax/following{/other_user}","gists_url":"https://api.github.com/users/mathjax/gists{/gist_id}","starred_url":"https://api.github.com/users/mathjax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathjax/subscriptions","organizations_url":"https://api.github.com/users/mathjax/orgs","repos_url":"https://api.github.com/users/mathjax/repos","events_url":"https://api.github.com/users/mathjax/events{/privacy}","received_events_url":"https://api.github.com/users/mathjax/received_events","type":"Organization","site_admin":false},"repo":{"id":52348698,"name":"mathjax-v3","full_name":"mathjax/mathjax-v3","owner":{"login":"mathjax","id":252187,"avatar_url":"https://avatars2.githubusercontent.com/u/252187?v=3","gravatar_id":"","url":"https://api.github.com/users/mathjax","html_url":"https://github.com/mathjax","followers_url":"https://api.github.com/users/mathjax/followers","following_url":"https://api.github.com/users/mathjax/following{/other_user}","gists_url":"https://api.github.com/users/mathjax/gists{/gist_id}","starred_url":"https://api.github.com/users/mathjax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathjax/subscriptions","organizations_url":"https://api.github.com/users/mathjax/orgs","repos_url":"https://api.github.com/users/mathjax/repos","events_url":"https://api.github.com/users/mathjax/events{/privacy}","received_events_url":"https://api.github.com/users/mathjax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mathjax/mathjax-v3","description":"A repository for early stages of MathJax v3 ","fork":false,"url":"https://api.github.com/repos/mathjax/mathjax-v3","forks_url":"https://api.github.com/repos/mathjax/mathjax-v3/forks","keys_url":"https://api.github.com/repos/mathjax/mathjax-v3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mathjax/mathjax-v3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mathjax/mathjax-v3/teams","hooks_url":"https://api.github.com/repos/mathjax/mathjax-v3/hooks","issue_events_url":"https://api.github.com/repos/mathjax/mathjax-v3/issues/events{/number}","events_url":"https://api.github.com/repos/mathjax/mathjax-v3/events","assignees_url":"https://api.github.com/repos/mathjax/mathjax-v3/assignees{/user}","branches_url":"https://api.github.com/repos/mathjax/mathjax-v3/branches{/branch}","tags_url":"https://api.github.com/repos/mathjax/mathjax-v3/tags","blobs_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/refs{/sha}","trees_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mathjax/mathjax-v3/statuses/{sha}","languages_url":"https://api.github.com/repos/mathjax/mathjax-v3/languages","stargazers_url":"https://api.github.com/repos/mathjax/mathjax-v3/stargazers","contributors_url":"https://api.github.com/repos/mathjax/mathjax-v3/contributors","subscribers_url":"https://api.github.com/repos/mathjax/mathjax-v3/subscribers","subscription_url":"https://api.github.com/repos/mathjax/mathjax-v3/subscription","commits_url":"https://api.github.com/repos/mathjax/mathjax-v3/commits{/sha}","git_commits_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/commits{/sha}","comments_url":"https://api.github.com/repos/mathjax/mathjax-v3/comments{/number}","issue_comment_url":"https://api.github.com/repos/mathjax/mathjax-v3/issues/comments{/number}","contents_url":"https://api.github.com/repos/mathjax/mathjax-v3/contents/{+path}","compare_url":"https://api.github.com/repos/mathjax/mathjax-v3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mathjax/mathjax-v3/merges","archive_url":"https://api.github.com/repos/mathjax/mathjax-v3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mathjax/mathjax-v3/downloads","issues_url":"https://api.github.com/repos/mathjax/mathjax-v3/issues{/number}","pulls_url":"https://api.github.com/repos/mathjax/mathjax-v3/pulls{/number}","milestones_url":"https://api.github.com/repos/mathjax/mathjax-v3/milestones{/number}","notifications_url":"https://api.github.com/repos/mathjax/mathjax-v3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mathjax/mathjax-v3/labels{/name}","releases_url":"https://api.github.com/repos/mathjax/mathjax-v3/releases{/id}","deployments_url":"https://api.github.com/repos/mathjax/mathjax-v3/deployments","created_at":"2016-02-23T09:52:03Z","updated_at":"2017-05-09T01:02:11Z","pushed_at":"2017-05-10T11:29:28Z","git_url":"git://github.com/mathjax/mathjax-v3.git","ssh_url":"git@github.com:mathjax/mathjax-v3.git","clone_url":"https://github.com/mathjax/mathjax-v3.git","svn_url":"https://github.com/mathjax/mathjax-v3","homepage":"","size":1618,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"mathjax:compare-branch","ref":"compare-branch","sha":"6f328be00c64a45848e487a4aea25ff72cc1d5bf","user":{"login":"mathjax","id":252187,"avatar_url":"https://avatars2.githubusercontent.com/u/252187?v=3","gravatar_id":"","url":"https://api.github.com/users/mathjax","html_url":"https://github.com/mathjax","followers_url":"https://api.github.com/users/mathjax/followers","following_url":"https://api.github.com/users/mathjax/following{/other_user}","gists_url":"https://api.github.com/users/mathjax/gists{/gist_id}","starred_url":"https://api.github.com/users/mathjax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathjax/subscriptions","organizations_url":"https://api.github.com/users/mathjax/orgs","repos_url":"https://api.github.com/users/mathjax/repos","events_url":"https://api.github.com/users/mathjax/events{/privacy}","received_events_url":"https://api.github.com/users/mathjax/received_events","type":"Organization","site_admin":false},"repo":{"id":52348698,"name":"mathjax-v3","full_name":"mathjax/mathjax-v3","owner":{"login":"mathjax","id":252187,"avatar_url":"https://avatars2.githubusercontent.com/u/252187?v=3","gravatar_id":"","url":"https://api.github.com/users/mathjax","html_url":"https://github.com/mathjax","followers_url":"https://api.github.com/users/mathjax/followers","following_url":"https://api.github.com/users/mathjax/following{/other_user}","gists_url":"https://api.github.com/users/mathjax/gists{/gist_id}","starred_url":"https://api.github.com/users/mathjax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathjax/subscriptions","organizations_url":"https://api.github.com/users/mathjax/orgs","repos_url":"https://api.github.com/users/mathjax/repos","events_url":"https://api.github.com/users/mathjax/events{/privacy}","received_events_url":"https://api.github.com/users/mathjax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mathjax/mathjax-v3","description":"A repository for early stages of MathJax v3 ","fork":false,"url":"https://api.github.com/repos/mathjax/mathjax-v3","forks_url":"https://api.github.com/repos/mathjax/mathjax-v3/forks","keys_url":"https://api.github.com/repos/mathjax/mathjax-v3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mathjax/mathjax-v3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mathjax/mathjax-v3/teams","hooks_url":"https://api.github.com/repos/mathjax/mathjax-v3/hooks","issue_events_url":"https://api.github.com/repos/mathjax/mathjax-v3/issues/events{/number}","events_url":"https://api.github.com/repos/mathjax/mathjax-v3/events","assignees_url":"https://api.github.com/repos/mathjax/mathjax-v3/assignees{/user}","branches_url":"https://api.github.com/repos/mathjax/mathjax-v3/branches{/branch}","tags_url":"https://api.github.com/repos/mathjax/mathjax-v3/tags","blobs_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/refs{/sha}","trees_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mathjax/mathjax-v3/statuses/{sha}","languages_url":"https://api.github.com/repos/mathjax/mathjax-v3/languages","stargazers_url":"https://api.github.com/repos/mathjax/mathjax-v3/stargazers","contributors_url":"https://api.github.com/repos/mathjax/mathjax-v3/contributors","subscribers_url":"https://api.github.com/repos/mathjax/mathjax-v3/subscribers","subscription_url":"https://api.github.com/repos/mathjax/mathjax-v3/subscription","commits_url":"https://api.github.com/repos/mathjax/mathjax-v3/commits{/sha}","git_commits_url":"https://api.github.com/repos/mathjax/mathjax-v3/git/commits{/sha}","comments_url":"https://api.github.com/repos/mathjax/mathjax-v3/comments{/number}","issue_comment_url":"https://api.github.com/repos/mathjax/mathjax-v3/issues/comments{/number}","contents_url":"https://api.github.com/repos/mathjax/mathjax-v3/contents/{+path}","compare_url":"https://api.github.com/repos/mathjax/mathjax-v3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mathjax/mathjax-v3/merges","archive_url":"https://api.github.com/repos/mathjax/mathjax-v3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mathjax/mathjax-v3/downloads","issues_url":"https://api.github.com/repos/mathjax/mathjax-v3/issues{/number}","pulls_url":"https://api.github.com/repos/mathjax/mathjax-v3/pulls{/number}","milestones_url":"https://api.github.com/repos/mathjax/mathjax-v3/milestones{/number}","notifications_url":"https://api.github.com/repos/mathjax/mathjax-v3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mathjax/mathjax-v3/labels{/name}","releases_url":"https://api.github.com/repos/mathjax/mathjax-v3/releases{/id}","deployments_url":"https://api.github.com/repos/mathjax/mathjax-v3/deployments","created_at":"2016-02-23T09:52:03Z","updated_at":"2017-05-09T01:02:11Z","pushed_at":"2017-05-10T11:29:28Z","git_url":"git://github.com/mathjax/mathjax-v3.git","ssh_url":"git@github.com:mathjax/mathjax-v3.git","clone_url":"https://github.com/mathjax/mathjax-v3.git","svn_url":"https://github.com/mathjax/mathjax-v3","homepage":"","size":1618,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/20"},"html":{"href":"https://github.com/mathjax/mathjax-v3/pull/20"},"issue":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/issues/20"},"comments":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/mathjax/mathjax-v3/statuses/2e76d08cf358b652cc143f3edd9bde9f8027ca4b"}}}}
{"actor":{"display_login":"dpvc"}}