{"action":"created","issue":{"url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1189","repository_url":"https://api.github.com/repos/styleguidist/react-styleguidist","labels_url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1189/labels{/name}","comments_url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1189/comments","events_url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1189/events","html_url":"https://github.com/styleguidist/react-styleguidist/issues/1189","id":375647105,"node_id":"MDU6SXNzdWUzNzU2NDcxMDU=","number":1189,"title":"Inline JavaScript comments don’t work in template.body.raw","user":{"login":"jaller94","id":10872136,"node_id":"MDQ6VXNlcjEwODcyMTM2","avatar_url":"https://avatars1.githubusercontent.com/u/10872136?v=4","gravatar_id":"","url":"https://api.github.com/users/jaller94","html_url":"https://github.com/jaller94","followers_url":"https://api.github.com/users/jaller94/followers","following_url":"https://api.github.com/users/jaller94/following{/other_user}","gists_url":"https://api.github.com/users/jaller94/gists{/gist_id}","starred_url":"https://api.github.com/users/jaller94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaller94/subscriptions","organizations_url":"https://api.github.com/users/jaller94/orgs","repos_url":"https://api.github.com/users/jaller94/repos","events_url":"https://api.github.com/users/jaller94/events{/privacy}","received_events_url":"https://api.github.com/users/jaller94/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-30T19:04:17Z","updated_at":"2018-10-31T14:22:13Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Trimming template’s white spaces messes with JavaScript inline comments.\r\n\r\nhttps://github.com/styleguidist/react-styleguidist/blob/e59671d4d4f1d57e89e5d731942d616458f492b4/scripts/make-webpack-config.js#L29\r\n\r\nThe line above removes all white spaces, including new lines. This comments every line after `//` inside a `<script />`.\r\n\r\nDemo: https://github.com/jaller94/demo-react-styleguidist-js-inline-comment\r\n\r\n**Expected behavior**\r\nInline comments in `script` node should not break the script.\r\n\r\nMy suggestions of how to fix this:\r\n* Remove (inline) comments before trimming white spaces.\r\n* Don’t trim new lines.\r\n* Don’t trim any white spaces.\r\n* Transform them to `/* comment */` before trimming white spaces."},"comment":{"url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/comments/434705794","html_url":"https://github.com/styleguidist/react-styleguidist/issues/1189#issuecomment-434705794","issue_url":"https://api.github.com/repos/styleguidist/react-styleguidist/issues/1189","id":434705794,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDcwNTc5NA==","user":{"login":"sapegin","id":70067,"node_id":"MDQ6VXNlcjcwMDY3","avatar_url":"https://avatars2.githubusercontent.com/u/70067?v=4","gravatar_id":"","url":"https://api.github.com/users/sapegin","html_url":"https://github.com/sapegin","followers_url":"https://api.github.com/users/sapegin/followers","following_url":"https://api.github.com/users/sapegin/following{/other_user}","gists_url":"https://api.github.com/users/sapegin/gists{/gist_id}","starred_url":"https://api.github.com/users/sapegin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapegin/subscriptions","organizations_url":"https://api.github.com/users/sapegin/orgs","repos_url":"https://api.github.com/users/sapegin/repos","events_url":"https://api.github.com/users/sapegin/events{/privacy}","received_events_url":"https://api.github.com/users/sapegin/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T14:22:13Z","updated_at":"2018-10-31T14:22:13Z","author_association":"MEMBER","body":"> Don’t trim any white spaces.\r\n\r\nThe templates are usually to small to care about whitespace I think. Feel free to send a pull request!"}}
{"actor":{"display_login":"sapegin"}}