{"action":"created","issue":{"url":"https://api.github.com/repos/postcss/autoprefixer-core/issues/27","labels_url":"https://api.github.com/repos/postcss/autoprefixer-core/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/postcss/autoprefixer-core/issues/27/comments","events_url":"https://api.github.com/repos/postcss/autoprefixer-core/issues/27/events","html_url":"https://github.com/postcss/autoprefixer-core/issues/27","id":55367501,"number":27,"title":"broken source map for inline sourcemap with sourcesContent set","user":{"login":"bassjobsen","id":954055,"avatar_url":"https://avatars.githubusercontent.com/u/954055?v=3","gravatar_id":"","url":"https://api.github.com/users/bassjobsen","html_url":"https://github.com/bassjobsen","followers_url":"https://api.github.com/users/bassjobsen/followers","following_url":"https://api.github.com/users/bassjobsen/following{/other_user}","gists_url":"https://api.github.com/users/bassjobsen/gists{/gist_id}","starred_url":"https://api.github.com/users/bassjobsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bassjobsen/subscriptions","organizations_url":"https://api.github.com/users/bassjobsen/orgs","repos_url":"https://api.github.com/users/bassjobsen/repos","events_url":"https://api.github.com/users/bassjobsen/events{/privacy}","received_events_url":"https://api.github.com/users/bassjobsen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/postcss/autoprefixer-core/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-24T11:07:00Z","updated_at":"2015-01-24T23:44:10Z","closed_at":"2015-01-24T16:42:43Z","body":"i have t.less:\r\n\r\n```css\r\np {\r\ntransform: scaleX(0.5);\r\n}\r\n```\r\nThen i run `lessc less/t.less t.css --source-map  --source-map-map-inline --source-map-less-inline`\r\n\r\nNow my `t.css` contains the following content:\r\n\r\n```text\r\np {\r\n  transform: scaleX(0.5);\r\n}\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxlc3MvdC5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0EsV0FBVyxXQUFYIiwiZmlsZSI6InQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsicCB7XG50cmFuc2Zvcm06IHNjYWxlWCgwLjUpO1xufVxuIl19 */\r\n```\r\nthe base encode string correspondence with:\r\n\r\n```json\r\n{\"version\":3,\"sources\":[\"less/t.less\"],\"names\":[],\"mappings\":\"AAAA;EACA,WAAW,WAAX\",\"file\":\"t.css\",\"sourcesContent\":[\"p {\\ntransform: scaleX(0.5);\\n}\\n\"]}\r\n```\r\n\r\nThen i run:\r\n\r\n```javascript\r\nfs = require('fs')\r\nfs.readFile('t.css', 'utf8', function (err,css) {\r\n  if (err) {\r\n    return console.log(err);\r\n  }\r\n\r\nvar autoprefixer = require('autoprefixer-core');\r\nvar prefixed = autoprefixer.process(css,{map:{inline:true}}).css;\r\n\r\nconsole.log(prefixed);\r\n});\r\n```\r\n\r\nThe above script outputs:\r\n\r\n```text\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxlc3MvdC5sZXNzIiwidC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDQSxnQ0FBQTtNQUFBLDRCQUFBO1VBQUEsd0JBQUE7RUNDQyIsImZpbGUiOiJ0by5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyJwIHtcbnRyYW5zZm9ybTogc2NhbGVYKDAuNSk7XG59XG4iLCJwIHtcbiAgdHJhbnNmb3JtOiBzY2FsZVgoMC41KTtcbn1cbi8qIyBzb3VyY2VNYXBwaW5nVVJMPWRhdGE6YXBwbGljYXRpb24vanNvbjtiYXNlNjQsZXlKMlpYSnphVzl1SWpvekxDSnpiM1Z5WTJWeklqcGJJbXhsYzNNdmRDNXNaWE56SWwwc0ltNWhiV1Z6SWpwYlhTd2liV0Z3Y0dsdVozTWlPaUpCUVVGQk8wVkJRMEVzVjBGQlZ5eFhRVUZZSWl3aVptbHNaU0k2SW5RdVkzTnpJaXdpYzI5MWNtTmxjME52Ym5SbGJuUWlPbHNpY0NCN1hHNTBjbUZ1YzJadmNtMDZJSE5qWVd4bFdDZ3dMalVwTzF4dWZWeHVJbDE5ICovIl19 */\r\n```\r\nThe base64 encoded part now seems to contain two sourcemaps:\r\n \r\n```json\r\n{\"version\":3,\"sources\":[\"less/t.less\",\"t.css\"],\"names\":[],\"mappings\":\"AAAA;EACA,gCAAA;MAAA,4BAAA;UAAA,wBAAA;ECCC\",\"file\":\"to.css\",\"sourcesContent\":[\"p {\\ntransform: scaleX(0.5);\\n}\\n\",\"p {\\n  transform: scaleX(0.5);\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxlc3MvdC5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0EsV0FBVyxXQUFYIiwiZmlsZSI6InQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsicCB7XG50cmFuc2Zvcm06IHNjYWxlWCgwLjUpO1xufVxuIl19 */\"]}\r\n```\r\n\r\nRelated issues:\r\n - https://github.com/plus3network/gulp-less/issues/126\r\n - http://stackoverflow.com/a/27830905/1596547 (comments on the answer)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/postcss/autoprefixer-core/issues/comments/71343277","html_url":"https://github.com/postcss/autoprefixer-core/issues/27#issuecomment-71343277","issue_url":"https://api.github.com/repos/postcss/autoprefixer-core/issues/27","id":71343277,"user":{"login":"ai","id":19343,"avatar_url":"https://avatars.githubusercontent.com/u/19343?v=3","gravatar_id":"","url":"https://api.github.com/users/ai","html_url":"https://github.com/ai","followers_url":"https://api.github.com/users/ai/followers","following_url":"https://api.github.com/users/ai/following{/other_user}","gists_url":"https://api.github.com/users/ai/gists{/gist_id}","starred_url":"https://api.github.com/users/ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ai/subscriptions","organizations_url":"https://api.github.com/users/ai/orgs","repos_url":"https://api.github.com/users/ai/repos","events_url":"https://api.github.com/users/ai/events{/privacy}","received_events_url":"https://api.github.com/users/ai/received_events","type":"User","site_admin":false},"created_at":"2015-01-24T23:44:10Z","updated_at":"2015-01-24T23:44:10Z","body":"Yeap, problem is in Less, because it doesn’t add mappings for `{`. So I recommend to create a issue in Less repo. I think Less fix will not be too big."}}