{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/corrosion/issues/115","repository_url":"https://api.github.com/repos/eclipse/corrosion","labels_url":"https://api.github.com/repos/eclipse/corrosion/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/corrosion/issues/115/comments","events_url":"https://api.github.com/repos/eclipse/corrosion/issues/115/events","html_url":"https://github.com/eclipse/corrosion/issues/115","id":353801652,"node_id":"MDU6SXNzdWUzNTM4MDE2NTI=","number":115,"title":"Raw string coloring buggy","user":{"login":"Boereck","id":919163,"node_id":"MDQ6VXNlcjkxOTE2Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/919163?v=4","gravatar_id":"","url":"https://api.github.com/users/Boereck","html_url":"https://github.com/Boereck","followers_url":"https://api.github.com/users/Boereck/followers","following_url":"https://api.github.com/users/Boereck/following{/other_user}","gists_url":"https://api.github.com/users/Boereck/gists{/gist_id}","starred_url":"https://api.github.com/users/Boereck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boereck/subscriptions","organizations_url":"https://api.github.com/users/Boereck/orgs","repos_url":"https://api.github.com/users/Boereck/repos","events_url":"https://api.github.com/users/Boereck/events{/privacy}","received_events_url":"https://api.github.com/users/Boereck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-24T14:15:22Z","updated_at":"2018-08-24T16:57:36Z","closed_at":null,"author_association":"NONE","body":"Hi, the way how the syntax coloring of raw strings work is not correct. If you look at the [reference](https://doc.rust-lang.org/reference/tokens.html#characters-and-strings) you will see that there is a flexible amount of # delimiters that can be used. E.g. `let foo = r##\" \"# \"##;` is a valid raw string. To correct the current Textmate grammar, you can replace the current `rust_raw_string` rule with this one:\r\n```xml\r\n<key>rust_raw_string</key>\r\n<dict>\r\n    <key>begin</key>\r\n    <string>r(#*)\"</string>\r\n    <key>end</key>\r\n    <string>\"(\\1)</string>\r\n    <key>name</key>\r\n    <string>string.quoted.other.raw.rust</string>\r\n</dict>\r\n```\r\nIt seems the rule also has to be move above the `rust_string` rule to have higher precedence. I don't know where you got the grammar from and if you want yours to diverge from the original. If not this issue maybe should be opened for the originating project.\r\nEDIT: The `rust_raw_string` rule already is above `rust_string`, I guess I played around too much with the grammar, before landing on a version that worked."},"comment":{"url":"https://api.github.com/repos/eclipse/corrosion/issues/comments/415818937","html_url":"https://github.com/eclipse/corrosion/issues/115#issuecomment-415818937","issue_url":"https://api.github.com/repos/eclipse/corrosion/issues/115","id":415818937,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTgxODkzNw==","user":{"login":"Boereck","id":919163,"node_id":"MDQ6VXNlcjkxOTE2Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/919163?v=4","gravatar_id":"","url":"https://api.github.com/users/Boereck","html_url":"https://github.com/Boereck","followers_url":"https://api.github.com/users/Boereck/followers","following_url":"https://api.github.com/users/Boereck/following{/other_user}","gists_url":"https://api.github.com/users/Boereck/gists{/gist_id}","starred_url":"https://api.github.com/users/Boereck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boereck/subscriptions","organizations_url":"https://api.github.com/users/Boereck/orgs","repos_url":"https://api.github.com/users/Boereck/repos","events_url":"https://api.github.com/users/Boereck/events{/privacy}","received_events_url":"https://api.github.com/users/Boereck/received_events","type":"User","site_admin":false},"created_at":"2018-08-24T16:57:36Z","updated_at":"2018-08-24T16:57:36Z","author_association":"NONE","body":"Alright, so the grammar from VS Code is located here: \r\nhttps://github.com/Microsoft/vscode/blob/master/extensions/rust/syntaxes/rust.tmLanguage.json\r\nThis grammar itself is coming from this grammar:\r\nhttps://github.com/zargony/atom-language-rust/blob/master/grammars/rust.cson\r\nVS Codes version seems to be updated regularly when the original updates. The updates to the grammar are more recent and seem to do a solid job.\r\n\r\nBoth versions are MIT licensed. VS Code's version can be transformed into an XML version using a VS Code plugin."}}
{"actor":{"display_login":"Boereck"}}