{"action":"created","comment":{"url":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/comments/26725309","id":26725309,"diff_hunk":"@@ -4,64 +4,64 @@\n define(function (require, exports, module) {\n     \"use strict\";\n \n-    var CommandManager      = brackets.getModule(\"command/CommandManager\"),\n-        Menus               = brackets.getModule(\"command/Menus\"),\n-        AppInit             = brackets.getModule(\"utils/AppInit\"),\n-        EditorManager       = brackets.getModule(\"editor/EditorManager\"),\n-        ExtensionUtils      = brackets.getModule(\"utils/ExtensionUtils\"),\n-        BottomDisplay       = require(\"BottomDisplayPanal\"),\n-        MarkErrors          = require(\"errorDisplay\"),\n-        parser              = require(\"parser\"),\n-        results             = [],\n-        showingErrors       = false,\n-        lastErrorIndex      = -1,\n-        BottomDisplayVar;\n-\n-    ExtensionUtils.loadStyleSheet(module, \"main.less\");   \n-    \n+    var CommandManager        = brackets.getModule(\"command/CommandManager\"),\n+        Menus                 = brackets.getModule(\"command/Menus\"),\n+        AppInit               = brackets.getModule(\"utils/AppInit\"),\n+        EditorManager         = brackets.getModule(\"editor/EditorManager\"),\n+        ExtensionUtils        = brackets.getModule(\"utils/ExtensionUtils\"),\n+        BottomDisplay         = require(\"BottomDisplayPanal\"),\n+        MarkErrors            = require(\"errorDisplay\"),\n+        parse                 = require(\"parser\"),\n+        showingDescription,\n+        BottomDisplayVar,\n+        errorCache = {};\n+\n+    ExtensionUtils.loadStyleSheet(module, \"main.less\");\n+\n     function main(){\n-        var editor = EditorManager.getFocusedEditor();\n-\n-        if(editor && editor.document.getLanguage()._name === \"HTML\"){\n-            var text   = editor.document.getText();\n-            var result = parser(text);\n-            \n-            if(result.length > 0){\n-                if(lastErrorIndex !== -1 && lastErrorIndex !== (result[3] - 1)){\n-                    clearAllErrors();\n-                }\n-                MarkErrors.showGutter(result[3] - 1);\n-                MarkErrors.markErrors(result[3] - 1, result[4] - 1, result[1], result[2]);\n-                lastErrorIndex = (result[3] - 1);\n-                results.push(result);\n-            }else{\n-                clearAllErrors();\n-            }\n-            BottomDisplayVar.update(text);\n+        var editor = EditorManager.getActiveEditor();\n+        var error;\n+        var html;\n+\n+        if(!editor || editor.document.getLanguage()._name !== \"HTML\") {","path":"main.js","position":56,"original_position":56,"commit_id":"9e896d4be5268c467b66b9cc3737205aaf36085f","original_commit_id":"9e896d4be5268c467b66b9cc3737205aaf36085f","user":{"login":"humphd","id":427398,"avatar_url":"https://avatars.githubusercontent.com/u/427398?v=3","gravatar_id":"","url":"https://api.github.com/users/humphd","html_url":"https://github.com/humphd","followers_url":"https://api.github.com/users/humphd/followers","following_url":"https://api.github.com/users/humphd/following{/other_user}","gists_url":"https://api.github.com/users/humphd/gists{/gist_id}","starred_url":"https://api.github.com/users/humphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humphd/subscriptions","organizations_url":"https://api.github.com/users/humphd/orgs","repos_url":"https://api.github.com/users/humphd/repos","events_url":"https://api.github.com/users/humphd/events{/privacy}","received_events_url":"https://api.github.com/users/humphd/received_events","type":"User","site_admin":false},"body":"It's concerning that you're having to use a private member here, `_name`.  @K-LV was doing something like this using a public `id` field, I wonder if you could too?","created_at":"2015-03-19T02:12:23Z","updated_at":"2015-03-19T02:12:23Z","html_url":"https://github.com/KeniMorri/HTMLHinter/pull/3#discussion_r26725309","pull_request_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/comments/26725309"},"html":{"href":"https://github.com/KeniMorri/HTMLHinter/pull/3#discussion_r26725309"},"pull_request":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/3","id":31480710,"html_url":"https://github.com/KeniMorri/HTMLHinter/pull/3","diff_url":"https://github.com/KeniMorri/HTMLHinter/pull/3.diff","patch_url":"https://github.com/KeniMorri/HTMLHinter/pull/3.patch","issue_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/issues/3","number":3,"state":"open","locked":false,"title":"Complete refactor to make it work","user":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-18T22:54:02Z","updated_at":"2015-03-19T02:12:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8aea55de35d3083f1fbaef3dc600a131450c032f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/3/commits","review_comments_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/3/comments","review_comment_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/issues/3/comments","statuses_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/statuses/9e896d4be5268c467b66b9cc3737205aaf36085f","head":{"label":"gideonthomas:brackets-issue70","ref":"brackets-issue70","sha":"9e896d4be5268c467b66b9cc3737205aaf36085f","user":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"repo":{"id":32166574,"name":"HTMLHinter","full_name":"gideonthomas/HTMLHinter","owner":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gideonthomas/HTMLHinter","description":"","fork":true,"url":"https://api.github.com/repos/gideonthomas/HTMLHinter","forks_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/forks","keys_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/teams","hooks_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/hooks","issue_events_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/issues/events{/number}","events_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/events","assignees_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/assignees{/user}","branches_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/branches{/branch}","tags_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/tags","blobs_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/git/refs{/sha}","trees_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/statuses/{sha}","languages_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/languages","stargazers_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/stargazers","contributors_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/contributors","subscribers_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/subscribers","subscription_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/subscription","commits_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/commits{/sha}","git_commits_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/git/commits{/sha}","comments_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/comments{/number}","issue_comment_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/issues/comments{/number}","contents_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/contents/{+path}","compare_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/merges","archive_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/downloads","issues_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/issues{/number}","pulls_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/pulls{/number}","milestones_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/milestones{/number}","notifications_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/labels{/name}","releases_url":"https://api.github.com/repos/gideonthomas/HTMLHinter/releases{/id}","created_at":"2015-03-13T16:19:12Z","updated_at":"2015-03-13T16:19:12Z","pushed_at":"2015-03-18T22:53:01Z","git_url":"git://github.com/gideonthomas/HTMLHinter.git","ssh_url":"git@github.com:gideonthomas/HTMLHinter.git","clone_url":"https://github.com/gideonthomas/HTMLHinter.git","svn_url":"https://github.com/gideonthomas/HTMLHinter","homepage":null,"size":152,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"KeniMorri:master","ref":"master","sha":"9b75b755ecf282031c6f0976d56c793849557d06","user":{"login":"KeniMorri","id":1750230,"avatar_url":"https://avatars.githubusercontent.com/u/1750230?v=3","gravatar_id":"","url":"https://api.github.com/users/KeniMorri","html_url":"https://github.com/KeniMorri","followers_url":"https://api.github.com/users/KeniMorri/followers","following_url":"https://api.github.com/users/KeniMorri/following{/other_user}","gists_url":"https://api.github.com/users/KeniMorri/gists{/gist_id}","starred_url":"https://api.github.com/users/KeniMorri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeniMorri/subscriptions","organizations_url":"https://api.github.com/users/KeniMorri/orgs","repos_url":"https://api.github.com/users/KeniMorri/repos","events_url":"https://api.github.com/users/KeniMorri/events{/privacy}","received_events_url":"https://api.github.com/users/KeniMorri/received_events","type":"User","site_admin":false},"repo":{"id":29874934,"name":"HTMLHinter","full_name":"KeniMorri/HTMLHinter","owner":{"login":"KeniMorri","id":1750230,"avatar_url":"https://avatars.githubusercontent.com/u/1750230?v=3","gravatar_id":"","url":"https://api.github.com/users/KeniMorri","html_url":"https://github.com/KeniMorri","followers_url":"https://api.github.com/users/KeniMorri/followers","following_url":"https://api.github.com/users/KeniMorri/following{/other_user}","gists_url":"https://api.github.com/users/KeniMorri/gists{/gist_id}","starred_url":"https://api.github.com/users/KeniMorri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeniMorri/subscriptions","organizations_url":"https://api.github.com/users/KeniMorri/orgs","repos_url":"https://api.github.com/users/KeniMorri/repos","events_url":"https://api.github.com/users/KeniMorri/events{/privacy}","received_events_url":"https://api.github.com/users/KeniMorri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KeniMorri/HTMLHinter","description":"","fork":false,"url":"https://api.github.com/repos/KeniMorri/HTMLHinter","forks_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/forks","keys_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/teams","hooks_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/hooks","issue_events_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/issues/events{/number}","events_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/events","assignees_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/assignees{/user}","branches_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/branches{/branch}","tags_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/tags","blobs_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/git/refs{/sha}","trees_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/statuses/{sha}","languages_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/languages","stargazers_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/stargazers","contributors_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/contributors","subscribers_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/subscribers","subscription_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/subscription","commits_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/commits{/sha}","git_commits_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/git/commits{/sha}","comments_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/comments{/number}","issue_comment_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/issues/comments{/number}","contents_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/contents/{+path}","compare_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/merges","archive_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/downloads","issues_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/issues{/number}","pulls_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls{/number}","milestones_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/milestones{/number}","notifications_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/labels{/name}","releases_url":"https://api.github.com/repos/KeniMorri/HTMLHinter/releases{/id}","created_at":"2015-01-26T18:23:45Z","updated_at":"2015-02-25T16:31:46Z","pushed_at":"2015-02-25T16:31:46Z","git_url":"git://github.com/KeniMorri/HTMLHinter.git","ssh_url":"git@github.com:KeniMorri/HTMLHinter.git","clone_url":"https://github.com/KeniMorri/HTMLHinter.git","svn_url":"https://github.com/KeniMorri/HTMLHinter","homepage":null,"size":284,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/3"},"html":{"href":"https://github.com/KeniMorri/HTMLHinter/pull/3"},"issue":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/issues/3"},"comments":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/KeniMorri/HTMLHinter/statuses/9e896d4be5268c467b66b9cc3737205aaf36085f"}}}}