{"action":"created","comment":{"url":"https://api.github.com/repos/bardsoftware/ace/pulls/comments/76094720","id":76094720,"diff_hunk":"@@ -162,9 +164,55 @@ define((require, exports, module) ->\n     ch = ContextHandler = {\n       contextPreviewExists: false\n       UPDATE_DELAY: 1000\n+      LABEL_SEQUENCE: [\n+        {type: \"keyword\", value: /^\\\\label$/}\n+        {type: \"lparen\", value: /^\\{$/}\n+        {type: \"variable.parameter\", value: /.*/}\n+        {type: \"rparen\", value: /^\\}$/}\n+      ]\n+      LABEL_PARAMETER_INDEX: 2\n \n       getWholeEquation: (range) ->\n-        editor.getSession().getTextRange(range)\n+\n+        tokenValues = []\n+        labelSequenceIndex = 0\n+        labelParameters = []\n+        curLabelParameter = null\n+        curLabelTokens = []\n+\n+        tokenIterator = new TokenIterator(editor.getSession(), range.start.row, range.start.column)\n+        tokenIterator.stepForward() # at first it should be on the closing token of begin sequence","path":"lib/ace/ext/papeeria/katex-previewer.coffee","position":55,"original_position":55,"commit_id":"cf6d346b0733268b033a24acc68d961c8082a0f0","original_commit_id":"cf6d346b0733268b033a24acc68d961c8082a0f0","user":{"login":"dbarashev","id":2028330,"avatar_url":"https://avatars.githubusercontent.com/u/2028330?v=3","gravatar_id":"","url":"https://api.github.com/users/dbarashev","html_url":"https://github.com/dbarashev","followers_url":"https://api.github.com/users/dbarashev/followers","following_url":"https://api.github.com/users/dbarashev/following{/other_user}","gists_url":"https://api.github.com/users/dbarashev/gists{/gist_id}","starred_url":"https://api.github.com/users/dbarashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbarashev/subscriptions","organizations_url":"https://api.github.com/users/dbarashev/orgs","repos_url":"https://api.github.com/users/dbarashev/repos","events_url":"https://api.github.com/users/dbarashev/events{/privacy}","received_events_url":"https://api.github.com/users/dbarashev/received_events","type":"User","site_admin":false},"body":"you don't need to determine it. You just want the caller to pass properly positioned iterator. You already implicitly request to pass quite specific range: one which starts after \\begin{equation} -- this is not visible in the function contract but you rely on it and do `stepForward` here with fingers crossed. I suggest moving this responsibility on the caller: let those who call the function position the iterator and do `stepForward` if needed.","created_at":"2016-08-24T16:50:39Z","updated_at":"2016-08-24T16:50:39Z","html_url":"https://github.com/bardsoftware/ace/pull/79#discussion_r76094720","pull_request_url":"https://api.github.com/repos/bardsoftware/ace/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/comments/76094720"},"html":{"href":"https://github.com/bardsoftware/ace/pull/79#discussion_r76094720"},"pull_request":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/bardsoftware/ace/pulls/79","id":82535716,"html_url":"https://github.com/bardsoftware/ace/pull/79","diff_url":"https://github.com/bardsoftware/ace/pull/79.diff","patch_url":"https://github.com/bardsoftware/ace/pull/79.patch","issue_url":"https://api.github.com/repos/bardsoftware/ace/issues/79","number":79,"state":"open","locked":false,"title":"Filtering labels using tokenizer","user":{"login":"yanenkoa","id":11256769,"avatar_url":"https://avatars.githubusercontent.com/u/11256769?v=3","gravatar_id":"","url":"https://api.github.com/users/yanenkoa","html_url":"https://github.com/yanenkoa","followers_url":"https://api.github.com/users/yanenkoa/followers","following_url":"https://api.github.com/users/yanenkoa/following{/other_user}","gists_url":"https://api.github.com/users/yanenkoa/gists{/gist_id}","starred_url":"https://api.github.com/users/yanenkoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanenkoa/subscriptions","organizations_url":"https://api.github.com/users/yanenkoa/orgs","repos_url":"https://api.github.com/users/yanenkoa/repos","events_url":"https://api.github.com/users/yanenkoa/events{/privacy}","received_events_url":"https://api.github.com/users/yanenkoa/received_events","type":"User","site_admin":false},"body":"@dbarashev Please review.","created_at":"2016-08-24T12:49:09Z","updated_at":"2016-08-24T16:50:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"717deca03ef258762ad1ffad6471bb3bca179e5d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bardsoftware/ace/pulls/79/commits","review_comments_url":"https://api.github.com/repos/bardsoftware/ace/pulls/79/comments","review_comment_url":"https://api.github.com/repos/bardsoftware/ace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bardsoftware/ace/issues/79/comments","statuses_url":"https://api.github.com/repos/bardsoftware/ace/statuses/cf6d346b0733268b033a24acc68d961c8082a0f0","head":{"label":"bardsoftware:tkt_78_labels","ref":"tkt_78_labels","sha":"cf6d346b0733268b033a24acc68d961c8082a0f0","user":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars.githubusercontent.com/u/2625618?v=3","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":13590146,"name":"ace","full_name":"bardsoftware/ace","owner":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars.githubusercontent.com/u/2625618?v=3","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bardsoftware/ace","description":"Ace (Ajax.org Cloud9 Editor)","fork":true,"url":"https://api.github.com/repos/bardsoftware/ace","forks_url":"https://api.github.com/repos/bardsoftware/ace/forks","keys_url":"https://api.github.com/repos/bardsoftware/ace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bardsoftware/ace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bardsoftware/ace/teams","hooks_url":"https://api.github.com/repos/bardsoftware/ace/hooks","issue_events_url":"https://api.github.com/repos/bardsoftware/ace/issues/events{/number}","events_url":"https://api.github.com/repos/bardsoftware/ace/events","assignees_url":"https://api.github.com/repos/bardsoftware/ace/assignees{/user}","branches_url":"https://api.github.com/repos/bardsoftware/ace/branches{/branch}","tags_url":"https://api.github.com/repos/bardsoftware/ace/tags","blobs_url":"https://api.github.com/repos/bardsoftware/ace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bardsoftware/ace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bardsoftware/ace/git/refs{/sha}","trees_url":"https://api.github.com/repos/bardsoftware/ace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bardsoftware/ace/statuses/{sha}","languages_url":"https://api.github.com/repos/bardsoftware/ace/languages","stargazers_url":"https://api.github.com/repos/bardsoftware/ace/stargazers","contributors_url":"https://api.github.com/repos/bardsoftware/ace/contributors","subscribers_url":"https://api.github.com/repos/bardsoftware/ace/subscribers","subscription_url":"https://api.github.com/repos/bardsoftware/ace/subscription","commits_url":"https://api.github.com/repos/bardsoftware/ace/commits{/sha}","git_commits_url":"https://api.github.com/repos/bardsoftware/ace/git/commits{/sha}","comments_url":"https://api.github.com/repos/bardsoftware/ace/comments{/number}","issue_comment_url":"https://api.github.com/repos/bardsoftware/ace/issues/comments{/number}","contents_url":"https://api.github.com/repos/bardsoftware/ace/contents/{+path}","compare_url":"https://api.github.com/repos/bardsoftware/ace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bardsoftware/ace/merges","archive_url":"https://api.github.com/repos/bardsoftware/ace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bardsoftware/ace/downloads","issues_url":"https://api.github.com/repos/bardsoftware/ace/issues{/number}","pulls_url":"https://api.github.com/repos/bardsoftware/ace/pulls{/number}","milestones_url":"https://api.github.com/repos/bardsoftware/ace/milestones{/number}","notifications_url":"https://api.github.com/repos/bardsoftware/ace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bardsoftware/ace/labels{/name}","releases_url":"https://api.github.com/repos/bardsoftware/ace/releases{/id}","deployments_url":"https://api.github.com/repos/bardsoftware/ace/deployments","created_at":"2013-10-15T13:03:16Z","updated_at":"2016-07-04T14:13:07Z","pushed_at":"2016-08-24T12:49:09Z","git_url":"git://github.com/bardsoftware/ace.git","ssh_url":"git@github.com:bardsoftware/ace.git","clone_url":"https://github.com/bardsoftware/ace.git","svn_url":"https://github.com/bardsoftware/ace","homepage":"http://ace.c9.io","size":37443,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":5,"default_branch":"internship-2016"}},"base":{"label":"bardsoftware:internship-2016","ref":"internship-2016","sha":"a1b710d9adbaf9d0b1660ee60b3480b3f6142dab","user":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars.githubusercontent.com/u/2625618?v=3","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":13590146,"name":"ace","full_name":"bardsoftware/ace","owner":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars.githubusercontent.com/u/2625618?v=3","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bardsoftware/ace","description":"Ace (Ajax.org Cloud9 Editor)","fork":true,"url":"https://api.github.com/repos/bardsoftware/ace","forks_url":"https://api.github.com/repos/bardsoftware/ace/forks","keys_url":"https://api.github.com/repos/bardsoftware/ace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bardsoftware/ace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bardsoftware/ace/teams","hooks_url":"https://api.github.com/repos/bardsoftware/ace/hooks","issue_events_url":"https://api.github.com/repos/bardsoftware/ace/issues/events{/number}","events_url":"https://api.github.com/repos/bardsoftware/ace/events","assignees_url":"https://api.github.com/repos/bardsoftware/ace/assignees{/user}","branches_url":"https://api.github.com/repos/bardsoftware/ace/branches{/branch}","tags_url":"https://api.github.com/repos/bardsoftware/ace/tags","blobs_url":"https://api.github.com/repos/bardsoftware/ace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bardsoftware/ace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bardsoftware/ace/git/refs{/sha}","trees_url":"https://api.github.com/repos/bardsoftware/ace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bardsoftware/ace/statuses/{sha}","languages_url":"https://api.github.com/repos/bardsoftware/ace/languages","stargazers_url":"https://api.github.com/repos/bardsoftware/ace/stargazers","contributors_url":"https://api.github.com/repos/bardsoftware/ace/contributors","subscribers_url":"https://api.github.com/repos/bardsoftware/ace/subscribers","subscription_url":"https://api.github.com/repos/bardsoftware/ace/subscription","commits_url":"https://api.github.com/repos/bardsoftware/ace/commits{/sha}","git_commits_url":"https://api.github.com/repos/bardsoftware/ace/git/commits{/sha}","comments_url":"https://api.github.com/repos/bardsoftware/ace/comments{/number}","issue_comment_url":"https://api.github.com/repos/bardsoftware/ace/issues/comments{/number}","contents_url":"https://api.github.com/repos/bardsoftware/ace/contents/{+path}","compare_url":"https://api.github.com/repos/bardsoftware/ace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bardsoftware/ace/merges","archive_url":"https://api.github.com/repos/bardsoftware/ace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bardsoftware/ace/downloads","issues_url":"https://api.github.com/repos/bardsoftware/ace/issues{/number}","pulls_url":"https://api.github.com/repos/bardsoftware/ace/pulls{/number}","milestones_url":"https://api.github.com/repos/bardsoftware/ace/milestones{/number}","notifications_url":"https://api.github.com/repos/bardsoftware/ace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bardsoftware/ace/labels{/name}","releases_url":"https://api.github.com/repos/bardsoftware/ace/releases{/id}","deployments_url":"https://api.github.com/repos/bardsoftware/ace/deployments","created_at":"2013-10-15T13:03:16Z","updated_at":"2016-07-04T14:13:07Z","pushed_at":"2016-08-24T12:49:09Z","git_url":"git://github.com/bardsoftware/ace.git","ssh_url":"git@github.com:bardsoftware/ace.git","clone_url":"https://github.com/bardsoftware/ace.git","svn_url":"https://github.com/bardsoftware/ace","homepage":"http://ace.c9.io","size":37443,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":5,"default_branch":"internship-2016"}},"_links":{"self":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/79"},"html":{"href":"https://github.com/bardsoftware/ace/pull/79"},"issue":{"href":"https://api.github.com/repos/bardsoftware/ace/issues/79"},"comments":{"href":"https://api.github.com/repos/bardsoftware/ace/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/bardsoftware/ace/statuses/cf6d346b0733268b033a24acc68d961c8082a0f0"}}}}
{"actor":{"display_login":"dbarashev"}}