{"action":"created","issue":{"url":"https://api.github.com/repos/mattberkowitz/autoclose-html/issues/32","labels_url":"https://api.github.com/repos/mattberkowitz/autoclose-html/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/mattberkowitz/autoclose-html/issues/32/comments","events_url":"https://api.github.com/repos/mattberkowitz/autoclose-html/issues/32/events","html_url":"https://github.com/mattberkowitz/autoclose-html/issues/32","id":51423877,"number":32,"title":"Add support based on file extension, rather than file type.","user":{"login":"laszlof","id":1486486,"avatar_url":"https://avatars.githubusercontent.com/u/1486486?v=3","gravatar_id":"","url":"https://api.github.com/users/laszlof","html_url":"https://github.com/laszlof","followers_url":"https://api.github.com/users/laszlof/followers","following_url":"https://api.github.com/users/laszlof/following{/other_user}","gists_url":"https://api.github.com/users/laszlof/gists{/gist_id}","starred_url":"https://api.github.com/users/laszlof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laszlof/subscriptions","organizations_url":"https://api.github.com/users/laszlof/orgs","repos_url":"https://api.github.com/users/laszlof/repos","events_url":"https://api.github.com/users/laszlof/events{/privacy}","received_events_url":"https://api.github.com/users/laszlof/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mattberkowitz/autoclose-html/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-12-09T12:51:55Z","updated_at":"2015-04-08T19:54:39Z","closed_at":null,"body":"This plugin would probably be a bit more useful if it could be used in multiple file types. I'm sure theres a number of people who write HTML within PHP files, or one of the various template systems available, and could use the auto-complete feature. I personally use Handlebars templates and could make use of it if it was available.\r\n\r\nI think adding an option to the config to allow any file extension to be handled would be useful."},"comment":{"url":"https://api.github.com/repos/mattberkowitz/autoclose-html/issues/comments/91017865","html_url":"https://github.com/mattberkowitz/autoclose-html/issues/32#issuecomment-91017865","issue_url":"https://api.github.com/repos/mattberkowitz/autoclose-html/issues/32","id":91017865,"user":{"login":"seanosaur","id":3780395,"avatar_url":"https://avatars.githubusercontent.com/u/3780395?v=3","gravatar_id":"","url":"https://api.github.com/users/seanosaur","html_url":"https://github.com/seanosaur","followers_url":"https://api.github.com/users/seanosaur/followers","following_url":"https://api.github.com/users/seanosaur/following{/other_user}","gists_url":"https://api.github.com/users/seanosaur/gists{/gist_id}","starred_url":"https://api.github.com/users/seanosaur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanosaur/subscriptions","organizations_url":"https://api.github.com/users/seanosaur/orgs","repos_url":"https://api.github.com/users/seanosaur/repos","events_url":"https://api.github.com/users/seanosaur/events{/privacy}","received_events_url":"https://api.github.com/users/seanosaur/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T19:54:39Z","updated_at":"2015-04-08T19:54:39Z","body":"Is there a cleaner or better way to do it than what I did?\r\n\r\n\r\nHere's all I did, not sure if it's the correct way \r\n\r\nWas:\r\n\r\n    17    grammars: ['HTML']\r\n\r\n    42    @grammars = ['HTML'].concat(value.split(concatPattern))\r\n\r\nIs: \r\n\r\n    17    grammars: ['HTML', 'HTML (Go)', 'HTML (Rails)', 'HTML (Mustache)', 'HTML (Ruby - ERB)', 'PHP']\r\n\r\n    42    @grammars = ['HTML', 'HTML (Go)', 'HTML (Rails)', 'HTML (Mustache)', 'HTML (Ruby - ERB)', 'PHP'].concat(value.split(concatPattern))\r\n"}}