{"action":"created","issue":{"url":"https://api.github.com/repos/github/linguist/issues/3072","repository_url":"https://api.github.com/repos/github/linguist","labels_url":"https://api.github.com/repos/github/linguist/issues/3072/labels{/name}","comments_url":"https://api.github.com/repos/github/linguist/issues/3072/comments","events_url":"https://api.github.com/repos/github/linguist/issues/3072/events","html_url":"https://github.com/github/linguist/issues/3072","id":161853199,"number":3072,"title":"Syntax highlighting not working with script tag and type=\"text/ecmascript-6\"","user":{"login":"stoewer","id":2076136,"avatar_url":"https://avatars.githubusercontent.com/u/2076136?v=3","gravatar_id":"","url":"https://api.github.com/users/stoewer","html_url":"https://github.com/stoewer","followers_url":"https://api.github.com/users/stoewer/followers","following_url":"https://api.github.com/users/stoewer/following{/other_user}","gists_url":"https://api.github.com/users/stoewer/gists{/gist_id}","starred_url":"https://api.github.com/users/stoewer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoewer/subscriptions","organizations_url":"https://api.github.com/users/stoewer/orgs","repos_url":"https://api.github.com/users/stoewer/repos","events_url":"https://api.github.com/users/stoewer/events{/privacy}","received_events_url":"https://api.github.com/users/stoewer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-23T06:59:39Z","updated_at":"2016-06-23T07:37:52Z","closed_at":null,"body":"If an html `<script>` tag has the attribute `type=\"text/ecmascript-6\"` the content is not highlighted as javascript:\r\n\r\n```html\r\n<script type=\"text/ecmascript-6\">\r\n    function printFoo(foo) {\r\n        console.lot(foo)\r\n    }\r\n</script>\r\n```\r\n\r\nHowever, it does work with  `type=\"text/javascript\"`:\r\n\r\n```html\r\n<script type=\"text/javascript\">\r\n    function printFoo(foo) {\r\n        console.lot(foo)\r\n    }\r\n</script>\r\n```\r\n\r\nSome editors and IDEs (e.g. Jetbrains products) require this attribute to be present in order to treat the content of `<script>` tags appropriately. This issue arises frequently when one is using Vue.js with [*.vue files like this](https://github.com/G-Node/gin-ui/blob/7c77a6e87d000f8d1fe22ef9b901c8a6a0f19f98/src/App.vue).\r\n\r\nThe highlighting is also not working if a `<script>` tag has `type=\"text/babel\"`, which is also commonly used to indicate es6 content in a `<script>` tag.\r\n"},"comment":{"url":"https://api.github.com/repos/github/linguist/issues/comments/227973189","html_url":"https://github.com/github/linguist/issues/3072#issuecomment-227973189","issue_url":"https://api.github.com/repos/github/linguist/issues/3072","id":227973189,"user":{"login":"Alhadis","id":2346707,"avatar_url":"https://avatars.githubusercontent.com/u/2346707?v=3","gravatar_id":"","url":"https://api.github.com/users/Alhadis","html_url":"https://github.com/Alhadis","followers_url":"https://api.github.com/users/Alhadis/followers","following_url":"https://api.github.com/users/Alhadis/following{/other_user}","gists_url":"https://api.github.com/users/Alhadis/gists{/gist_id}","starred_url":"https://api.github.com/users/Alhadis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alhadis/subscriptions","organizations_url":"https://api.github.com/users/Alhadis/orgs","repos_url":"https://api.github.com/users/Alhadis/repos","events_url":"https://api.github.com/users/Alhadis/events{/privacy}","received_events_url":"https://api.github.com/users/Alhadis/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T07:37:52Z","updated_at":"2016-06-23T07:37:52Z","body":"@pchaigno This actually seems to be an issue with the HTML syntax.\r\n\r\nSeems Linguist is using the [TextMate grammar](https://github.com/textmate/html.tmbundle) for highlighting instead of Atom's. Interestingly enough, if Atom's grammar is used for highlighting, it [works fine](https://github-lightshow.herokuapp.com/?utf8=%E2%9C%93&scope=from-url&grammar_url=https%3A%2F%2Fgithub.com%2Fatom%2Flanguage-html%2Fblob%2Fmaster%2Fgrammars%2Fhtml.cson&grammar_text=&code_source=from-text&code_url=&code=%3Cscript+type%3D%22text%2Fecmascript-6%22%3E%0D%0A%09function+printFoo%28foo%29+%7B%0D%0A%09%09console.log%28foo%29%0D%0A%09%7D%0D%0A%3C%2Fscript%3E).\r\n\r\nI think we should switch..."}}
{"actor":{"display_login":"Alhadis"}}