{"action":"opened","issue":{"url":"https://api.github.com/repos/tntim96/JSCover/issues/173","labels_url":"https://api.github.com/repos/tntim96/JSCover/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/tntim96/JSCover/issues/173/comments","events_url":"https://api.github.com/repos/tntim96/JSCover/issues/173/events","html_url":"https://github.com/tntim96/JSCover/issues/173","id":53336340,"number":173,"title":"labeled loops: newlines between label and loop","user":{"login":"Famlam","id":1315520,"avatar_url":"https://avatars.githubusercontent.com/u/1315520?v=3","gravatar_id":"","url":"https://api.github.com/users/Famlam","html_url":"https://github.com/Famlam","followers_url":"https://api.github.com/users/Famlam/followers","following_url":"https://api.github.com/users/Famlam/following{/other_user}","gists_url":"https://api.github.com/users/Famlam/gists{/gist_id}","starred_url":"https://api.github.com/users/Famlam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Famlam/subscriptions","organizations_url":"https://api.github.com/users/Famlam/orgs","repos_url":"https://api.github.com/users/Famlam/repos","events_url":"https://api.github.com/users/Famlam/events{/privacy}","received_events_url":"https://api.github.com/users/Famlam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-04T13:26:31Z","updated_at":"2015-01-04T13:26:31Z","closed_at":null,"body":"Hi,\r\n\r\nUsing the following code:\r\n```html\r\n<html><head></head><body><script src=\"test.js\"></script>Check console</html>\r\n```\r\nwith test.js:\r\n```js\r\ntop:\r\n  for (i=0; i<10; i++) {\r\n    for (j=0; j<10; j++) {\r\n      console.log(i,j);\r\n      continue top;\r\n    }\r\n  }\r\n  console.log(\"done!\")\r\n```\r\n\r\nand calling JSCover 1.0.15 using: (Win 8)\r\n```\r\n\"C:\\Program Files (x86)\\Java\\jre7\\bin\\java.exe\" -jar \"JSCover\\target\\dist\\JSCover-all.jar\" -ws --report-dir=\"JSCover\\output\"\r\n```\r\n\r\nyou get the following error in the console for the 4th line: \r\n```Uncaught SyntaxError: Undefined label 'top'```\r\n\r\nThis is because JSCover inserts a block `{` after the top, meaning that the `top` label is no longer connected to the for loop, and therefore the `top` in the `continue` statement does no longer reference to anything that can be continued. Using JSCover, the code looks like:\r\n```js\r\ntop:\r\n  {\r\n    _$jscoverage['/test.js'].lineData[2]++;\r\n    for (i = 0; visit1_2_1(i < 10); i++) {\r\n      _$jscoverage['/test.js'].lineData[3]++;\r\n      for (j = 0; visit2_3_1(j < 10); j++) {\r\n        _$jscoverage['/test.js'].lineData[4]++;\r\n        console.log(i, j);\r\n        _$jscoverage['/test.js'].lineData[5]++;\r\n        continue top;\r\n      }\r\n    }\r\n  }\r\n_$jscoverage['/test.js'].lineData[8]++;\r\nconsole.log(\"done!\");\r\n```\r\n\r\nThis is a regression as it worked fine in 1.0.12. (Didn't check 1.0.13 or 1.0.14).\r\n\r\nThanks!"}}