{"action":"opened","issue":{"url":"https://api.github.com/repos/SublimeText/PowerShell/issues/87","labels_url":"https://api.github.com/repos/SublimeText/PowerShell/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/SublimeText/PowerShell/issues/87/comments","events_url":"https://api.github.com/repos/SublimeText/PowerShell/issues/87/events","html_url":"https://github.com/SublimeText/PowerShell/issues/87","id":57784587,"number":87,"title":"Parsing of specific $() sequence breaks syntax highlighting for rest of file","user":{"login":"scottbilas","id":964720,"avatar_url":"https://avatars.githubusercontent.com/u/964720?v=3","gravatar_id":"","url":"https://api.github.com/users/scottbilas","html_url":"https://github.com/scottbilas","followers_url":"https://api.github.com/users/scottbilas/followers","following_url":"https://api.github.com/users/scottbilas/following{/other_user}","gists_url":"https://api.github.com/users/scottbilas/gists{/gist_id}","starred_url":"https://api.github.com/users/scottbilas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottbilas/subscriptions","organizations_url":"https://api.github.com/users/scottbilas/orgs","repos_url":"https://api.github.com/users/scottbilas/repos","events_url":"https://api.github.com/users/scottbilas/events{/privacy}","received_events_url":"https://api.github.com/users/scottbilas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-16T10:00:23Z","updated_at":"2015-02-16T10:00:23Z","closed_at":null,"body":"A very specific $() sequence causes the end of a string to not get recognized, which breaks syntax highlighting for all following code. This really needs to be explained with pictures. I have narrowed down the use case to this:\r\n\r\n\tfoo \"$(x).exe\"\r\n\r\n\tfunction blah() {\r\n\t    $blah = 'blah' # comment\r\n\t}\r\n\r\nWhich looks like this:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/964720/6209865/53766420-b5ca-11e4-8605-84effbb7f4ca.png)\r\n\r\nWhereas it really ought to look like this:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/964720/6209879/7804a23e-b5ca-11e4-85fa-fa54127259ab.png)\r\n\r\nThe correct syntax highlighting can be restored any number of ways:\r\n\r\n  * Commenting out the top line with #\r\n  * Changing \"exe\" to anything else (as I've done in the second screen shot). For example, 'xexe' or 'e'.\r\n  * Putting an extra double quote at the end of the line, or on a following line\r\n  * Messing around with the location of the parens.\r\n\r\nSome kind of pathological case for whatever rx's are operating underneath has been hit.\r\n\r\nI've been able to work around the issue by using an -f formatter rather than string interpolation.\r\n\r\nThis is with v2015.01.27.08.27.14."}}