{"action":"created","comment":{"url":"https://api.github.com/repos/ajaxorg/ace/pulls/comments/109285756","pull_request_review_id":30383004,"id":109285756,"diff_hunk":"@@ -11,116 +11,130 @@ var HamlHighlightRules = function() {\n     // regexp must not have capturing parentheses. Use (?:) instead.\n     // regexps are ordered -> the first match is used\n     HtmlHighlightRules.call(this);\n-    this.$rules.start.unshift(\n-        {\n-            token : \"punctuation.section.comment\",\n-            regex : /^\\s*\\/.*/\n-        },\n-        {\n-            token: \"string.quoted.double\",\n-            regex: \"==.+?==\"\n-        },\n-        {\n-            token: \"keyword.other.doctype\",\n-            regex: \"^!!!\\\\s*(?:[a-zA-Z0-9-_]+)?\"\n-        },\n-        RubyExports.qString,\n-        RubyExports.qqString,\n-        RubyExports.tString,\n-        {\n-            token: \"character.escape.haml\",\n-            regex: \"^\\\\s*\\\\\\\\.\"\n-        },\n-        {\n-            token: \"text\",\n-            regex: /^\\s*/,\n-            next: \"tag_single\"\n-        },\n-        RubyExports.constantNumericHex,\n-        RubyExports.constantNumericFloat,\n-        \n-        RubyExports.constantOtherSymbol,\n-        {\n-            token: \"text\",\n-            regex: \"=|-|~\",\n-            next: \"embedded_ruby\"\n-        }\n-    );\n-    this.$rules.tag_single = [\n-        {\n-            token: \"meta.tag.haml\",\n-            regex: /(%[\\w:\\-]+)/\n-        },\n-        {\n-            token: \"keyword.attribute-name.class.haml\",\n-            regex: \"\\\\.[\\\\w-]+\"\n-        },\n-        {\n-            token: \"keyword.attribute-name.id.haml\",\n-            regex: \"#[\\\\w-]+\"\n-        },\n-        {\n-            token: \"punctuation.section\",\n-            regex: \"\\\\{\",\n-            next: \"section\"\n-        },\n-        \n-        RubyExports.constantOtherSymbol,\n-        \n-        {\n-            token: \"text\",\n-            regex: /\\s/,\n-            next: \"start\"\n-        },\n-        {\n-            token: \"empty\",\n-            regex: \"$|(?!\\\\.|#|\\\\{|\\\\[|=|-|~|\\\\/)\",\n-            next: \"start\"\n-        }\n-    ];\n-    this.$rules.section = [\n-        RubyExports.constantOtherSymbol,\n-        \n-        RubyExports.qString,\n-        RubyExports.qqString,\n-        RubyExports.tString,\n-        \n-        RubyExports.constantNumericHex,\n-        RubyExports.constantNumericFloat,\n-        {\n-            token: \"punctuation.section\",\n-            regex: \"\\\\}\",\n-            next: \"start\"\n-        } \n-    ];\n-    \n-    this.$rules.embedded_ruby = [ \n-        RubyExports.constantNumericHex,\n-        RubyExports.constantNumericFloat,\n-        {\n+\n+    this.$rules = {\n+        \"start\": [\n+            {\n+                token: \"comment.block\", // multiline HTML comment\n+                regex: /^\\/$/,\n+                next: \"comment\"\n+            },\n+            {\n+                token: \"comment.block\", // multiline HAML comment\n+                regex: /^\\-#$/,\n+                next: \"comment\"\n+            },\n+            {\n+                token: \"comment.line\", // HTML comment\n+                regex: /\\/\\s*.*/\n+            },\n+            {\n+                token: \"comment.line\", // HAML comment\n+                regex: /-#\\s*.*/","path":"lib/ace/mode/haml_highlight_rules.js","position":110,"original_position":110,"commit_id":"8b5cd8c68132dd01dcb11d8a8b42c7f97046086a","original_commit_id":"8b5cd8c68132dd01dcb11d8a8b42c7f97046086a","user":{"login":"nightwing","id":341801,"avatar_url":"https://avatars2.githubusercontent.com/u/341801?v=3","gravatar_id":"","url":"https://api.github.com/users/nightwing","html_url":"https://github.com/nightwing","followers_url":"https://api.github.com/users/nightwing/followers","following_url":"https://api.github.com/users/nightwing/following{/other_user}","gists_url":"https://api.github.com/users/nightwing/gists{/gist_id}","starred_url":"https://api.github.com/users/nightwing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nightwing/subscriptions","organizations_url":"https://api.github.com/users/nightwing/orgs","repos_url":"https://api.github.com/users/nightwing/repos","events_url":"https://api.github.com/users/nightwing/events{/privacy}","received_events_url":"https://api.github.com/users/nightwing/received_events","type":"User","site_admin":false},"body":"Is this the correct behavior of comments or just a workaround for missing indentation detection? On https://www.haml-converter.com/ all comments seem to be multiline. We can add indentation detection similar to https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/yaml_highlight_rules.js#L74.","created_at":"2017-04-01T14:11:32Z","updated_at":"2017-04-01T14:11:32Z","html_url":"https://github.com/ajaxorg/ace/pull/3251#discussion_r109285756","pull_request_url":"https://api.github.com/repos/ajaxorg/ace/pulls/3251","_links":{"self":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/comments/109285756"},"html":{"href":"https://github.com/ajaxorg/ace/pull/3251#discussion_r109285756"},"pull_request":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/3251"}}},"pull_request":{"url":"https://api.github.com/repos/ajaxorg/ace/pulls/3251","id":113581367,"html_url":"https://github.com/ajaxorg/ace/pull/3251","diff_url":"https://github.com/ajaxorg/ace/pull/3251.diff","patch_url":"https://github.com/ajaxorg/ace/pull/3251.patch","issue_url":"https://api.github.com/repos/ajaxorg/ace/issues/3251","number":3251,"state":"open","locked":false,"title":"HAML Highlighting Rework and Fixes","user":{"login":"BigChief45","id":6859247,"avatar_url":"https://avatars0.githubusercontent.com/u/6859247?v=3","gravatar_id":"","url":"https://api.github.com/users/BigChief45","html_url":"https://github.com/BigChief45","followers_url":"https://api.github.com/users/BigChief45/followers","following_url":"https://api.github.com/users/BigChief45/following{/other_user}","gists_url":"https://api.github.com/users/BigChief45/gists{/gist_id}","starred_url":"https://api.github.com/users/BigChief45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigChief45/subscriptions","organizations_url":"https://api.github.com/users/BigChief45/orgs","repos_url":"https://api.github.com/users/BigChief45/repos","events_url":"https://api.github.com/users/BigChief45/events{/privacy}","received_events_url":"https://api.github.com/users/BigChief45/received_events","type":"User","site_admin":false},"body":"This PR is a rework of the HAML syntax highlighting. It also includes some fixes and new highlighting:\r\n\r\n- [x] Fixes an issue with HTML comments not being highlighted if they had line breaks between them.\r\n- [x] Fixes an issue where `%`, `#`, and `.` tags were not being highlighted in a similar way to the issue above, when indented.\r\n- [x] Adds highlighting for HAML comments (`-#`).\r\n- [x] Adds highlighting for block HAML and HTML comments.\r\n- [x] Adds highlighting for embedded Ruby instance variables (.ie `@user`).\r\n\r\nThe `demo/docs/haml.haml` file has also been updated to reflect this PR.\r\n\r\nThere are still some issues that I will try to address soon such as:\r\n\r\n- Comment slash character `/` begins highlighting when used as text. (i.e Date/Time)","created_at":"2017-03-31T06:15:13Z","updated_at":"2017-04-01T14:11:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2d9552a771c8a8542a625aa992bef44b7bc35ea","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ajaxorg/ace/pulls/3251/commits","review_comments_url":"https://api.github.com/repos/ajaxorg/ace/pulls/3251/comments","review_comment_url":"https://api.github.com/repos/ajaxorg/ace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ajaxorg/ace/issues/3251/comments","statuses_url":"https://api.github.com/repos/ajaxorg/ace/statuses/8b5cd8c68132dd01dcb11d8a8b42c7f97046086a","head":{"label":"BigChief45:haml-highlighting-fix","ref":"haml-highlighting-fix","sha":"8b5cd8c68132dd01dcb11d8a8b42c7f97046086a","user":{"login":"BigChief45","id":6859247,"avatar_url":"https://avatars0.githubusercontent.com/u/6859247?v=3","gravatar_id":"","url":"https://api.github.com/users/BigChief45","html_url":"https://github.com/BigChief45","followers_url":"https://api.github.com/users/BigChief45/followers","following_url":"https://api.github.com/users/BigChief45/following{/other_user}","gists_url":"https://api.github.com/users/BigChief45/gists{/gist_id}","starred_url":"https://api.github.com/users/BigChief45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigChief45/subscriptions","organizations_url":"https://api.github.com/users/BigChief45/orgs","repos_url":"https://api.github.com/users/BigChief45/repos","events_url":"https://api.github.com/users/BigChief45/events{/privacy}","received_events_url":"https://api.github.com/users/BigChief45/received_events","type":"User","site_admin":false},"repo":{"id":86650684,"name":"ace","full_name":"BigChief45/ace","owner":{"login":"BigChief45","id":6859247,"avatar_url":"https://avatars0.githubusercontent.com/u/6859247?v=3","gravatar_id":"","url":"https://api.github.com/users/BigChief45","html_url":"https://github.com/BigChief45","followers_url":"https://api.github.com/users/BigChief45/followers","following_url":"https://api.github.com/users/BigChief45/following{/other_user}","gists_url":"https://api.github.com/users/BigChief45/gists{/gist_id}","starred_url":"https://api.github.com/users/BigChief45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigChief45/subscriptions","organizations_url":"https://api.github.com/users/BigChief45/orgs","repos_url":"https://api.github.com/users/BigChief45/repos","events_url":"https://api.github.com/users/BigChief45/events{/privacy}","received_events_url":"https://api.github.com/users/BigChief45/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BigChief45/ace","description":"Ace (Ajax.org Cloud9 Editor)","fork":true,"url":"https://api.github.com/repos/BigChief45/ace","forks_url":"https://api.github.com/repos/BigChief45/ace/forks","keys_url":"https://api.github.com/repos/BigChief45/ace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BigChief45/ace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BigChief45/ace/teams","hooks_url":"https://api.github.com/repos/BigChief45/ace/hooks","issue_events_url":"https://api.github.com/repos/BigChief45/ace/issues/events{/number}","events_url":"https://api.github.com/repos/BigChief45/ace/events","assignees_url":"https://api.github.com/repos/BigChief45/ace/assignees{/user}","branches_url":"https://api.github.com/repos/BigChief45/ace/branches{/branch}","tags_url":"https://api.github.com/repos/BigChief45/ace/tags","blobs_url":"https://api.github.com/repos/BigChief45/ace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BigChief45/ace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BigChief45/ace/git/refs{/sha}","trees_url":"https://api.github.com/repos/BigChief45/ace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BigChief45/ace/statuses/{sha}","languages_url":"https://api.github.com/repos/BigChief45/ace/languages","stargazers_url":"https://api.github.com/repos/BigChief45/ace/stargazers","contributors_url":"https://api.github.com/repos/BigChief45/ace/contributors","subscribers_url":"https://api.github.com/repos/BigChief45/ace/subscribers","subscription_url":"https://api.github.com/repos/BigChief45/ace/subscription","commits_url":"https://api.github.com/repos/BigChief45/ace/commits{/sha}","git_commits_url":"https://api.github.com/repos/BigChief45/ace/git/commits{/sha}","comments_url":"https://api.github.com/repos/BigChief45/ace/comments{/number}","issue_comment_url":"https://api.github.com/repos/BigChief45/ace/issues/comments{/number}","contents_url":"https://api.github.com/repos/BigChief45/ace/contents/{+path}","compare_url":"https://api.github.com/repos/BigChief45/ace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BigChief45/ace/merges","archive_url":"https://api.github.com/repos/BigChief45/ace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BigChief45/ace/downloads","issues_url":"https://api.github.com/repos/BigChief45/ace/issues{/number}","pulls_url":"https://api.github.com/repos/BigChief45/ace/pulls{/number}","milestones_url":"https://api.github.com/repos/BigChief45/ace/milestones{/number}","notifications_url":"https://api.github.com/repos/BigChief45/ace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BigChief45/ace/labels{/name}","releases_url":"https://api.github.com/repos/BigChief45/ace/releases{/id}","deployments_url":"https://api.github.com/repos/BigChief45/ace/deployments","created_at":"2017-03-30T02:36:37Z","updated_at":"2017-03-30T02:36:47Z","pushed_at":"2017-03-31T06:21:07Z","git_url":"git://github.com/BigChief45/ace.git","ssh_url":"git@github.com:BigChief45/ace.git","clone_url":"https://github.com/BigChief45/ace.git","svn_url":"https://github.com/BigChief45/ace","homepage":"http://ace.c9.io","size":35565,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"ajaxorg:master","ref":"master","sha":"a44cfe68431420bd0c5b96afbe10882962e00f82","user":{"login":"ajaxorg","id":168515,"avatar_url":"https://avatars3.githubusercontent.com/u/168515?v=3","gravatar_id":"","url":"https://api.github.com/users/ajaxorg","html_url":"https://github.com/ajaxorg","followers_url":"https://api.github.com/users/ajaxorg/followers","following_url":"https://api.github.com/users/ajaxorg/following{/other_user}","gists_url":"https://api.github.com/users/ajaxorg/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaxorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaxorg/subscriptions","organizations_url":"https://api.github.com/users/ajaxorg/orgs","repos_url":"https://api.github.com/users/ajaxorg/repos","events_url":"https://api.github.com/users/ajaxorg/events{/privacy}","received_events_url":"https://api.github.com/users/ajaxorg/received_events","type":"Organization","site_admin":false},"repo":{"id":1028340,"name":"ace","full_name":"ajaxorg/ace","owner":{"login":"ajaxorg","id":168515,"avatar_url":"https://avatars3.githubusercontent.com/u/168515?v=3","gravatar_id":"","url":"https://api.github.com/users/ajaxorg","html_url":"https://github.com/ajaxorg","followers_url":"https://api.github.com/users/ajaxorg/followers","following_url":"https://api.github.com/users/ajaxorg/following{/other_user}","gists_url":"https://api.github.com/users/ajaxorg/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaxorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaxorg/subscriptions","organizations_url":"https://api.github.com/users/ajaxorg/orgs","repos_url":"https://api.github.com/users/ajaxorg/repos","events_url":"https://api.github.com/users/ajaxorg/events{/privacy}","received_events_url":"https://api.github.com/users/ajaxorg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ajaxorg/ace","description":"Ace (Ajax.org Cloud9 Editor)","fork":false,"url":"https://api.github.com/repos/ajaxorg/ace","forks_url":"https://api.github.com/repos/ajaxorg/ace/forks","keys_url":"https://api.github.com/repos/ajaxorg/ace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajaxorg/ace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajaxorg/ace/teams","hooks_url":"https://api.github.com/repos/ajaxorg/ace/hooks","issue_events_url":"https://api.github.com/repos/ajaxorg/ace/issues/events{/number}","events_url":"https://api.github.com/repos/ajaxorg/ace/events","assignees_url":"https://api.github.com/repos/ajaxorg/ace/assignees{/user}","branches_url":"https://api.github.com/repos/ajaxorg/ace/branches{/branch}","tags_url":"https://api.github.com/repos/ajaxorg/ace/tags","blobs_url":"https://api.github.com/repos/ajaxorg/ace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajaxorg/ace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajaxorg/ace/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajaxorg/ace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajaxorg/ace/statuses/{sha}","languages_url":"https://api.github.com/repos/ajaxorg/ace/languages","stargazers_url":"https://api.github.com/repos/ajaxorg/ace/stargazers","contributors_url":"https://api.github.com/repos/ajaxorg/ace/contributors","subscribers_url":"https://api.github.com/repos/ajaxorg/ace/subscribers","subscription_url":"https://api.github.com/repos/ajaxorg/ace/subscription","commits_url":"https://api.github.com/repos/ajaxorg/ace/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajaxorg/ace/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajaxorg/ace/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajaxorg/ace/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajaxorg/ace/contents/{+path}","compare_url":"https://api.github.com/repos/ajaxorg/ace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajaxorg/ace/merges","archive_url":"https://api.github.com/repos/ajaxorg/ace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajaxorg/ace/downloads","issues_url":"https://api.github.com/repos/ajaxorg/ace/issues{/number}","pulls_url":"https://api.github.com/repos/ajaxorg/ace/pulls{/number}","milestones_url":"https://api.github.com/repos/ajaxorg/ace/milestones{/number}","notifications_url":"https://api.github.com/repos/ajaxorg/ace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajaxorg/ace/labels{/name}","releases_url":"https://api.github.com/repos/ajaxorg/ace/releases{/id}","deployments_url":"https://api.github.com/repos/ajaxorg/ace/deployments","created_at":"2010-10-27T10:43:36Z","updated_at":"2017-04-01T12:19:30Z","pushed_at":"2017-04-01T13:41:32Z","git_url":"git://github.com/ajaxorg/ace.git","ssh_url":"git@github.com:ajaxorg/ace.git","clone_url":"https://github.com/ajaxorg/ace.git","svn_url":"https://github.com/ajaxorg/ace","homepage":"http://ace.c9.io","size":35564,"stargazers_count":14577,"watchers_count":14577,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3432,"mirror_url":null,"open_issues_count":604,"forks":3432,"open_issues":604,"watchers":14577,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/3251"},"html":{"href":"https://github.com/ajaxorg/ace/pull/3251"},"issue":{"href":"https://api.github.com/repos/ajaxorg/ace/issues/3251"},"comments":{"href":"https://api.github.com/repos/ajaxorg/ace/issues/3251/comments"},"review_comments":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/3251/comments"},"review_comment":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/3251/commits"},"statuses":{"href":"https://api.github.com/repos/ajaxorg/ace/statuses/8b5cd8c68132dd01dcb11d8a8b42c7f97046086a"}}}}
{"actor":{"display_login":"nightwing"}}