{"action":"created","issue":{"url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/792","repository_url":"https://api.github.com/repos/jakubpawlowicz/clean-css","labels_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/792/labels{/name}","comments_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/792/comments","events_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/792/events","html_url":"https://github.com/jakubpawlowicz/clean-css/issues/792","id":164182081,"number":792,"title":"Source map causes escape-store to throw error","user":{"login":"lewismoten","id":1164698,"avatar_url":"https://avatars.githubusercontent.com/u/1164698?v=3","gravatar_id":"","url":"https://api.github.com/users/lewismoten","html_url":"https://github.com/lewismoten","followers_url":"https://api.github.com/users/lewismoten/followers","following_url":"https://api.github.com/users/lewismoten/following{/other_user}","gists_url":"https://api.github.com/users/lewismoten/gists{/gist_id}","starred_url":"https://api.github.com/users/lewismoten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewismoten/subscriptions","organizations_url":"https://api.github.com/users/lewismoten/orgs","repos_url":"https://api.github.com/users/lewismoten/repos","events_url":"https://api.github.com/users/lewismoten/events{/privacy}","received_events_url":"https://api.github.com/users/lewismoten/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jakubpawlowicz/clean-css/labels/More%20details%20needed","name":"More details needed","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-06T21:45:24Z","updated_at":"2016-07-10T09:31:56Z","closed_at":null,"body":"I'm running into a problem with clean-css throwing `TypeError: Cannot read property '1' of null`.\r\n\r\nWhen I specify `sourceMap: false`, this error does not appear.\r\n\r\nExample code:\r\n\r\n```javascript\r\ngulp.task(\"sass\", () => gulp\r\n    .src(config.files.build)\r\n    .pipe(sourcemaps.init())\r\n    .pipe(sass())\r\n    .pipe(autoprefixer())\r\n    .pipe(cleanCss({debug: true}))\r\n    .pipe(sourcemaps.write(\"./\"))\r\n    .pipe(gulp.dest(\"css\"))\r\n);\r\n```\r\n\r\nEnvironment:\r\n\r\n- os: Windows 7 enterprise service pack 1\r\n- node: 6.2.0\r\n- gulp: 3.9.1\r\n- clean-css: 3.4.18\r\n- gulp-clean-css: 2.0.11\r\n- gulp-auto-prefixer: 3.1.0\r\n- gulp-sourcemaps: 1.6.0\r\n- gulp-sass: 2.3.2\r\n\r\nError Details:\r\n```\r\n(root)\\node_modules\\clean-css\\lib\\text\\escape-store.js:49\r\n  var index = this.restoreMatcher.exec(placeholder)[1];\r\n                                                   ^\r\n\r\nTypeError: Cannot read property '1' of null\r\n    at EscapeStore.restore ((root)\\node_modules\\clean-css\\lib\\text\\escape-store.js:49:52)\r\n    at restore ((root)\\node_modules\\clean-css\\lib\\text\\comments-processor.js:108:24)\r\n    at CommentsProcessor.restore ((root)\\node_modules\\clean-css\\lib\\text\\comments-processor.js:126:10)\r\n    at Object.restoreEscapes [as restore] ((root)\\node_modules\\clean-css\\lib\\clean.js:220:30)\r\n    at store ((root)\\node_modules\\clean-css\\lib\\stringifier\\source-maps.js:12:21)\r\n    at property ((root)\\node_modules\\clean-css\\lib\\stringifier\\helpers.js:73:5)\r\n    at body ((root)\\node_modules\\clean-css\\lib\\stringifier\\helpers.js:64:5)\r\n    at all ((root)\\node_modules\\clean-css\\lib\\stringifier\\helpers.js:154:9)\r\n    at stringify ((root)\\node_modules\\clean-css\\lib\\stringifier\\source-maps.js:88:3)\r\n    at minify ((root)\\node_modules\\clean-css\\lib\\clean.js:230:10)\r\n```\r\n\r\nI added some code to see what the placeholder was when the error is thrown and got the following:\r\n`__ESCAPED_COMMENT_CLEAN_CSS(0,-1)__`"},"comment":{"url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/comments/231579679","html_url":"https://github.com/jakubpawlowicz/clean-css/issues/792#issuecomment-231579679","issue_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/792","id":231579679,"user":{"login":"jakubpawlowicz","id":24273,"avatar_url":"https://avatars.githubusercontent.com/u/24273?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubpawlowicz","html_url":"https://github.com/jakubpawlowicz","followers_url":"https://api.github.com/users/jakubpawlowicz/followers","following_url":"https://api.github.com/users/jakubpawlowicz/following{/other_user}","gists_url":"https://api.github.com/users/jakubpawlowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubpawlowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubpawlowicz/subscriptions","organizations_url":"https://api.github.com/users/jakubpawlowicz/orgs","repos_url":"https://api.github.com/users/jakubpawlowicz/repos","events_url":"https://api.github.com/users/jakubpawlowicz/events{/privacy}","received_events_url":"https://api.github.com/users/jakubpawlowicz/received_events","type":"User","site_admin":false},"created_at":"2016-07-10T09:31:55Z","updated_at":"2016-07-10T09:31:55Z","body":"Thanks @lewismoten - a CSS file would be ideal or a standalone instruction how to compile SCSS file."}}
{"actor":{"display_login":"jakubpawlowicz"}}