{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/comments/24399113","id":24399113,"diff_hunk":"@@ -963,6 +963,54 @@ list of substrings of `STR' each followed by its face.\"\n      \"r\\\"With a backslash at the end\\\\\\\"\" font-lock-string-face\n      \"r##\\\"With two hashes\\\"##\" font-lock-string-face)))\n \n+(ert-deftest font-lock-raw-string-with-inner-hash ()\n+  (rust-test-font-lock\n+   \"r##\\\"I've got an octothorpe (#)\\\"##; foo()\"\n+   '(\"r##\\\"I've got an octothorpe (#)\\\"##\" font-lock-string-face)))\n+\n+(ert-deftest font-lock-string-ending-with-r-not-raw-string ()\n+  (rust-test-font-lock\n+   \"fn f() {\n+    \\\"Er\\\";\n+}\n+\n+fn g() {\n+    \\\"xs\\\";\n+}\"\n+   '(\"fn\" font-lock-keyword-face\n+     \"f\" font-lock-function-name-face\n+     \"\\\"Er\\\"\" font-lock-string-face\n+     \"fn\" font-lock-keyword-face\n+     \"g\" font-lock-function-name-face\n+     \"\\\"xs\\\"\" font-lock-string-face)))\n+\n+(ert-deftest font-lock-raw-string-trick-ending-followed-by-string-with-quote ()\n+  (rust-test-font-lock\n+   \"r\\\"With what looks like the start of a raw string at the end r#\\\";\n+not_a_string();\n+r##\\\"With \\\"embedded\\\" quote \\\"##;\"\n+   '(\"r\\\"With what looks like the start of a raw string at the end r#\\\"\" font-lock-string-face\n+     \"r##\\\"With \\\"embedded\\\" quote \\\"##\" font-lock-string-face)))\n+\n+(ert-deftest font-lock-raw-string-starter-inside-raw-string ()\n+  ;; Check that it won't look for a raw string beginning inside another raw string.\n+  (rust-test-font-lock\n+   \"r#\\\"In the first string r\\\" in the first string \\\"#;","path":"rust-mode-tests.el","position":36,"original_position":36,"commit_id":"8c9ea8827dd2e894e852eeff0aa01588bb053991","original_commit_id":"8c9ea8827dd2e894e852eeff0aa01588bb053991","user":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"body":"Incidentally, does `r##\"string \"# still same string\"##` work?","created_at":"2015-02-10T09:32:55Z","updated_at":"2015-02-10T09:32:55Z","html_url":"https://github.com/rust-lang/rust-mode/pull/35#discussion_r24399113","pull_request_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/comments/24399113"},"html":{"href":"https://github.com/rust-lang/rust-mode/pull/35#discussion_r24399113"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/35","id":28986081,"html_url":"https://github.com/rust-lang/rust-mode/pull/35","diff_url":"https://github.com/rust-lang/rust-mode/pull/35.diff","patch_url":"https://github.com/rust-lang/rust-mode/pull/35.patch","issue_url":"https://api.github.com/repos/rust-lang/rust-mode/issues/35","number":35,"state":"open","locked":false,"title":"Fix raw string bugs","user":{"login":"MicahChalmer","id":698400,"avatar_url":"https://avatars.githubusercontent.com/u/698400?v=3","gravatar_id":"","url":"https://api.github.com/users/MicahChalmer","html_url":"https://github.com/MicahChalmer","followers_url":"https://api.github.com/users/MicahChalmer/followers","following_url":"https://api.github.com/users/MicahChalmer/following{/other_user}","gists_url":"https://api.github.com/users/MicahChalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/MicahChalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicahChalmer/subscriptions","organizations_url":"https://api.github.com/users/MicahChalmer/orgs","repos_url":"https://api.github.com/users/MicahChalmer/repos","events_url":"https://api.github.com/users/MicahChalmer/events{/privacy}","received_events_url":"https://api.github.com/users/MicahChalmer/received_events","type":"User","site_admin":false},"body":"Fix #34, as well as some other odd cases that could fool the previously landed raw string handling (look in the tests for the details of the edge cases).\r\n\r\nWhile this may look like a lot more code, it's mostly because I've expanded the regexp using the built-in `rx` sexp notation, and commented each piece so that hopefully it can be understood later.  It certainly made it easier for _me_ to work with, especially after I had to make a single regexp cover all raw strings--both with and without `#` characters--to avoid some problems that popped up if I kept it split into two.","created_at":"2015-02-10T07:26:09Z","updated_at":"2015-02-10T09:32:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90f9ec32873f74954f5b41a95e979499aa8cf31a","assignee":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/35/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/35/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rust-lang/rust-mode/issues/35/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust-mode/statuses/8c9ea8827dd2e894e852eeff0aa01588bb053991","head":{"label":"MicahChalmer:fix-raw-string-bugs","ref":"fix-raw-string-bugs","sha":"8c9ea8827dd2e894e852eeff0aa01588bb053991","user":{"login":"MicahChalmer","id":698400,"avatar_url":"https://avatars.githubusercontent.com/u/698400?v=3","gravatar_id":"","url":"https://api.github.com/users/MicahChalmer","html_url":"https://github.com/MicahChalmer","followers_url":"https://api.github.com/users/MicahChalmer/followers","following_url":"https://api.github.com/users/MicahChalmer/following{/other_user}","gists_url":"https://api.github.com/users/MicahChalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/MicahChalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicahChalmer/subscriptions","organizations_url":"https://api.github.com/users/MicahChalmer/orgs","repos_url":"https://api.github.com/users/MicahChalmer/repos","events_url":"https://api.github.com/users/MicahChalmer/events{/privacy}","received_events_url":"https://api.github.com/users/MicahChalmer/received_events","type":"User","site_admin":false},"repo":{"id":30172000,"name":"rust-mode","full_name":"MicahChalmer/rust-mode","owner":{"login":"MicahChalmer","id":698400,"avatar_url":"https://avatars.githubusercontent.com/u/698400?v=3","gravatar_id":"","url":"https://api.github.com/users/MicahChalmer","html_url":"https://github.com/MicahChalmer","followers_url":"https://api.github.com/users/MicahChalmer/followers","following_url":"https://api.github.com/users/MicahChalmer/following{/other_user}","gists_url":"https://api.github.com/users/MicahChalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/MicahChalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicahChalmer/subscriptions","organizations_url":"https://api.github.com/users/MicahChalmer/orgs","repos_url":"https://api.github.com/users/MicahChalmer/repos","events_url":"https://api.github.com/users/MicahChalmer/events{/privacy}","received_events_url":"https://api.github.com/users/MicahChalmer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MicahChalmer/rust-mode","description":"Emacs configuration for Rust","fork":true,"url":"https://api.github.com/repos/MicahChalmer/rust-mode","forks_url":"https://api.github.com/repos/MicahChalmer/rust-mode/forks","keys_url":"https://api.github.com/repos/MicahChalmer/rust-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MicahChalmer/rust-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MicahChalmer/rust-mode/teams","hooks_url":"https://api.github.com/repos/MicahChalmer/rust-mode/hooks","issue_events_url":"https://api.github.com/repos/MicahChalmer/rust-mode/issues/events{/number}","events_url":"https://api.github.com/repos/MicahChalmer/rust-mode/events","assignees_url":"https://api.github.com/repos/MicahChalmer/rust-mode/assignees{/user}","branches_url":"https://api.github.com/repos/MicahChalmer/rust-mode/branches{/branch}","tags_url":"https://api.github.com/repos/MicahChalmer/rust-mode/tags","blobs_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MicahChalmer/rust-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/MicahChalmer/rust-mode/languages","stargazers_url":"https://api.github.com/repos/MicahChalmer/rust-mode/stargazers","contributors_url":"https://api.github.com/repos/MicahChalmer/rust-mode/contributors","subscribers_url":"https://api.github.com/repos/MicahChalmer/rust-mode/subscribers","subscription_url":"https://api.github.com/repos/MicahChalmer/rust-mode/subscription","commits_url":"https://api.github.com/repos/MicahChalmer/rust-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/MicahChalmer/rust-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/MicahChalmer/rust-mode/issues/comments/{number}","contents_url":"https://api.github.com/repos/MicahChalmer/rust-mode/contents/{+path}","compare_url":"https://api.github.com/repos/MicahChalmer/rust-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MicahChalmer/rust-mode/merges","archive_url":"https://api.github.com/repos/MicahChalmer/rust-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MicahChalmer/rust-mode/downloads","issues_url":"https://api.github.com/repos/MicahChalmer/rust-mode/issues{/number}","pulls_url":"https://api.github.com/repos/MicahChalmer/rust-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/MicahChalmer/rust-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/MicahChalmer/rust-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MicahChalmer/rust-mode/labels{/name}","releases_url":"https://api.github.com/repos/MicahChalmer/rust-mode/releases{/id}","created_at":"2015-02-02T05:05:23Z","updated_at":"2015-02-09T23:51:54Z","pushed_at":"2015-02-10T07:13:20Z","git_url":"git://github.com/MicahChalmer/rust-mode.git","ssh_url":"git@github.com:MicahChalmer/rust-mode.git","clone_url":"https://github.com/MicahChalmer/rust-mode.git","svn_url":"https://github.com/MicahChalmer/rust-mode","homepage":null,"size":331,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"8d99bf84b5cde2b61b0080be1cc82e858f9b014a","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":30004263,"name":"rust-mode","full_name":"rust-lang/rust-mode","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust-mode","description":"Emacs configuration for Rust","fork":false,"url":"https://api.github.com/repos/rust-lang/rust-mode","forks_url":"https://api.github.com/repos/rust-lang/rust-mode/forks","keys_url":"https://api.github.com/repos/rust-lang/rust-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust-mode/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust-mode/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust-mode/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust-mode/events","assignees_url":"https://api.github.com/repos/rust-lang/rust-mode/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust-mode/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust-mode/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust-mode/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust-mode/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust-mode/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust-mode/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust-mode/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust-mode/issues/comments/{number}","contents_url":"https://api.github.com/repos/rust-lang/rust-mode/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust-mode/merges","archive_url":"https://api.github.com/repos/rust-lang/rust-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust-mode/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust-mode/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust-mode/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust-mode/releases{/id}","created_at":"2015-01-29T04:53:17Z","updated_at":"2015-02-08T12:02:00Z","pushed_at":"2015-02-08T12:01:59Z","git_url":"git://github.com/rust-lang/rust-mode.git","ssh_url":"git@github.com:rust-lang/rust-mode.git","clone_url":"https://github.com/rust-lang/rust-mode.git","svn_url":"https://github.com/rust-lang/rust-mode","homepage":null,"size":263,"stargazers_count":9,"watchers_count":9,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":13,"forks":7,"open_issues":13,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/35"},"html":{"href":"https://github.com/rust-lang/rust-mode/pull/35"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust-mode/issues/35"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust-mode/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust-mode/statuses/8c9ea8827dd2e894e852eeff0aa01588bb053991"}}}}