{"action":"created","comment":{"url":"https://api.github.com/repos/yihui/knitr/pulls/comments/127248778","pull_request_review_id":49814247,"id":127248778,"diff_hunk":"@@ -31,7 +31,7 @@ all_patterns = list(\n   `md` = list(\n     chunk.begin = '^[\\t >]*```+\\\\s*\\\\{([a-zA-Z0-9]+.*)\\\\}\\\\s*$',\n     chunk.end = '^[\\t >]*```+\\\\s*$',\n-    ref.chunk = '^\\\\s*<<(.+)>>\\\\s*$', inline.code = '`r[ #]([^`]+)\\\\s*`'),\n+    ref.chunk = '^\\\\s*<<(.+)>>\\\\s*$', inline.code = '(?<!(^|\\n)``)`r[ #]([^`]+)\\\\s*`'),","path":"R/pattern.R","position":5,"original_position":5,"commit_id":"50203535ccd4c1c4623d979d1249fd464539cac0","original_commit_id":"50203535ccd4c1c4623d979d1249fd464539cac0","user":{"login":"yihui","id":163582,"avatar_url":"https://avatars1.githubusercontent.com/u/163582?v=3","gravatar_id":"","url":"https://api.github.com/users/yihui","html_url":"https://github.com/yihui","followers_url":"https://api.github.com/users/yihui/followers","following_url":"https://api.github.com/users/yihui/following{/other_user}","gists_url":"https://api.github.com/users/yihui/gists{/gist_id}","starred_url":"https://api.github.com/users/yihui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yihui/subscriptions","organizations_url":"https://api.github.com/users/yihui/orgs","repos_url":"https://api.github.com/users/yihui/repos","events_url":"https://api.github.com/users/yihui/events{/privacy}","received_events_url":"https://api.github.com/users/yihui/received_events","type":"User","site_admin":false},"body":"Scratch that. I misunderstood it.","created_at":"2017-07-13T15:23:55Z","updated_at":"2017-07-13T15:23:55Z","html_url":"https://github.com/yihui/knitr/pull/1416#discussion_r127248778","pull_request_url":"https://api.github.com/repos/yihui/knitr/pulls/1416","_links":{"self":{"href":"https://api.github.com/repos/yihui/knitr/pulls/comments/127248778"},"html":{"href":"https://github.com/yihui/knitr/pull/1416#discussion_r127248778"},"pull_request":{"href":"https://api.github.com/repos/yihui/knitr/pulls/1416"}}},"pull_request":{"url":"https://api.github.com/repos/yihui/knitr/pulls/1416","id":130392705,"html_url":"https://github.com/yihui/knitr/pull/1416","diff_url":"https://github.com/yihui/knitr/pull/1416.diff","patch_url":"https://github.com/yihui/knitr/pull/1416.patch","issue_url":"https://api.github.com/repos/yihui/knitr/issues/1416","number":1416,"state":"open","locked":false,"title":"Lines starting with three backticks are not inline code chunks (#655)","user":{"login":"gadenbuie","id":5420529,"avatar_url":"https://avatars3.githubusercontent.com/u/5420529?v=3","gravatar_id":"","url":"https://api.github.com/users/gadenbuie","html_url":"https://github.com/gadenbuie","followers_url":"https://api.github.com/users/gadenbuie/followers","following_url":"https://api.github.com/users/gadenbuie/following{/other_user}","gists_url":"https://api.github.com/users/gadenbuie/gists{/gist_id}","starred_url":"https://api.github.com/users/gadenbuie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gadenbuie/subscriptions","organizations_url":"https://api.github.com/users/gadenbuie/orgs","repos_url":"https://api.github.com/users/gadenbuie/repos","events_url":"https://api.github.com/users/gadenbuie/events{/privacy}","received_events_url":"https://api.github.com/users/gadenbuie/received_events","type":"User","site_admin":false},"body":"Adds negative lookback to md inline code pattern so that the parser does not flag code chunks as inline when a line starts with three backticks.\r\n\r\nI ran into this when migrating a Jekyll blog to blogdown, where I had an extension that allowed attributes to be included in the same line as the ` ``` ` code fence, but the space after ` ```r ` matched the inline code pattern.\r\n\r\n### These things will knit:\r\n\r\n    ``` {r} \r\n       #{r}_^ line ends\r\n    summary(cars)\r\n    ```\r\n    \r\n    Inline with newline before backtick:\r\n    `r nrow(cars)`\r\n    rows knits to 50.\r\n\r\n    Inline with line break inside code: `r nrow(\r\n    cars\r\n    )` \r\n    rows also knits to 50.\r\n\r\n    Three backticks, but inline: ```r nrow(\r\n    cars)``` rows knits to ``50``.\r\n\r\n### These things will not knit:\r\n\r\n    ```r \r\n      #r_^ line ends\r\n    summary(cars)\r\n    ```\r\n\r\n    ``` r \r\n      #_r_^ line ends\r\n    summary(cars)\r\n    ```\r\n    \r\n    ```r something\r\n    summary(cars)\r\n    ```\r\n    \r\n    Inline with newline after backtick r: `r\r\n    nrow(cars)` \r\n    rows.","created_at":"2017-07-13T14:59:52Z","updated_at":"2017-07-13T15:23:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be9c89c9bc888f3e5b2df8d8c4ce5e2797640b63","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/yihui/knitr/pulls/1416/commits","review_comments_url":"https://api.github.com/repos/yihui/knitr/pulls/1416/comments","review_comment_url":"https://api.github.com/repos/yihui/knitr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yihui/knitr/issues/1416/comments","statuses_url":"https://api.github.com/repos/yihui/knitr/statuses/50203535ccd4c1c4623d979d1249fd464539cac0","head":{"label":"gadenbuie:md-inline-code-neg-lookback","ref":"md-inline-code-neg-lookback","sha":"50203535ccd4c1c4623d979d1249fd464539cac0","user":{"login":"gadenbuie","id":5420529,"avatar_url":"https://avatars3.githubusercontent.com/u/5420529?v=3","gravatar_id":"","url":"https://api.github.com/users/gadenbuie","html_url":"https://github.com/gadenbuie","followers_url":"https://api.github.com/users/gadenbuie/followers","following_url":"https://api.github.com/users/gadenbuie/following{/other_user}","gists_url":"https://api.github.com/users/gadenbuie/gists{/gist_id}","starred_url":"https://api.github.com/users/gadenbuie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gadenbuie/subscriptions","organizations_url":"https://api.github.com/users/gadenbuie/orgs","repos_url":"https://api.github.com/users/gadenbuie/repos","events_url":"https://api.github.com/users/gadenbuie/events{/privacy}","received_events_url":"https://api.github.com/users/gadenbuie/received_events","type":"User","site_admin":false},"repo":{"id":97049959,"name":"knitr","full_name":"gadenbuie/knitr","owner":{"login":"gadenbuie","id":5420529,"avatar_url":"https://avatars3.githubusercontent.com/u/5420529?v=3","gravatar_id":"","url":"https://api.github.com/users/gadenbuie","html_url":"https://github.com/gadenbuie","followers_url":"https://api.github.com/users/gadenbuie/followers","following_url":"https://api.github.com/users/gadenbuie/following{/other_user}","gists_url":"https://api.github.com/users/gadenbuie/gists{/gist_id}","starred_url":"https://api.github.com/users/gadenbuie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gadenbuie/subscriptions","organizations_url":"https://api.github.com/users/gadenbuie/orgs","repos_url":"https://api.github.com/users/gadenbuie/repos","events_url":"https://api.github.com/users/gadenbuie/events{/privacy}","received_events_url":"https://api.github.com/users/gadenbuie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gadenbuie/knitr","description":"A general-purpose tool for dynamic report generation in R","fork":true,"url":"https://api.github.com/repos/gadenbuie/knitr","forks_url":"https://api.github.com/repos/gadenbuie/knitr/forks","keys_url":"https://api.github.com/repos/gadenbuie/knitr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gadenbuie/knitr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gadenbuie/knitr/teams","hooks_url":"https://api.github.com/repos/gadenbuie/knitr/hooks","issue_events_url":"https://api.github.com/repos/gadenbuie/knitr/issues/events{/number}","events_url":"https://api.github.com/repos/gadenbuie/knitr/events","assignees_url":"https://api.github.com/repos/gadenbuie/knitr/assignees{/user}","branches_url":"https://api.github.com/repos/gadenbuie/knitr/branches{/branch}","tags_url":"https://api.github.com/repos/gadenbuie/knitr/tags","blobs_url":"https://api.github.com/repos/gadenbuie/knitr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gadenbuie/knitr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gadenbuie/knitr/git/refs{/sha}","trees_url":"https://api.github.com/repos/gadenbuie/knitr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gadenbuie/knitr/statuses/{sha}","languages_url":"https://api.github.com/repos/gadenbuie/knitr/languages","stargazers_url":"https://api.github.com/repos/gadenbuie/knitr/stargazers","contributors_url":"https://api.github.com/repos/gadenbuie/knitr/contributors","subscribers_url":"https://api.github.com/repos/gadenbuie/knitr/subscribers","subscription_url":"https://api.github.com/repos/gadenbuie/knitr/subscription","commits_url":"https://api.github.com/repos/gadenbuie/knitr/commits{/sha}","git_commits_url":"https://api.github.com/repos/gadenbuie/knitr/git/commits{/sha}","comments_url":"https://api.github.com/repos/gadenbuie/knitr/comments{/number}","issue_comment_url":"https://api.github.com/repos/gadenbuie/knitr/issues/comments{/number}","contents_url":"https://api.github.com/repos/gadenbuie/knitr/contents/{+path}","compare_url":"https://api.github.com/repos/gadenbuie/knitr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gadenbuie/knitr/merges","archive_url":"https://api.github.com/repos/gadenbuie/knitr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gadenbuie/knitr/downloads","issues_url":"https://api.github.com/repos/gadenbuie/knitr/issues{/number}","pulls_url":"https://api.github.com/repos/gadenbuie/knitr/pulls{/number}","milestones_url":"https://api.github.com/repos/gadenbuie/knitr/milestones{/number}","notifications_url":"https://api.github.com/repos/gadenbuie/knitr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gadenbuie/knitr/labels{/name}","releases_url":"https://api.github.com/repos/gadenbuie/knitr/releases{/id}","deployments_url":"https://api.github.com/repos/gadenbuie/knitr/deployments","created_at":"2017-07-12T20:38:11Z","updated_at":"2017-07-12T20:38:13Z","pushed_at":"2017-07-13T14:31:40Z","git_url":"git://github.com/gadenbuie/knitr.git","ssh_url":"git@github.com:gadenbuie/knitr.git","clone_url":"https://github.com/gadenbuie/knitr.git","svn_url":"https://github.com/gadenbuie/knitr","homepage":"https://yihui.name/knitr","size":6539,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"yihui:master","ref":"master","sha":"846c0a5d13c6869c50eea27c1884041e71eb2312","user":{"login":"yihui","id":163582,"avatar_url":"https://avatars1.githubusercontent.com/u/163582?v=3","gravatar_id":"","url":"https://api.github.com/users/yihui","html_url":"https://github.com/yihui","followers_url":"https://api.github.com/users/yihui/followers","following_url":"https://api.github.com/users/yihui/following{/other_user}","gists_url":"https://api.github.com/users/yihui/gists{/gist_id}","starred_url":"https://api.github.com/users/yihui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yihui/subscriptions","organizations_url":"https://api.github.com/users/yihui/orgs","repos_url":"https://api.github.com/users/yihui/repos","events_url":"https://api.github.com/users/yihui/events{/privacy}","received_events_url":"https://api.github.com/users/yihui/received_events","type":"User","site_admin":false},"repo":{"id":2594513,"name":"knitr","full_name":"yihui/knitr","owner":{"login":"yihui","id":163582,"avatar_url":"https://avatars1.githubusercontent.com/u/163582?v=3","gravatar_id":"","url":"https://api.github.com/users/yihui","html_url":"https://github.com/yihui","followers_url":"https://api.github.com/users/yihui/followers","following_url":"https://api.github.com/users/yihui/following{/other_user}","gists_url":"https://api.github.com/users/yihui/gists{/gist_id}","starred_url":"https://api.github.com/users/yihui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yihui/subscriptions","organizations_url":"https://api.github.com/users/yihui/orgs","repos_url":"https://api.github.com/users/yihui/repos","events_url":"https://api.github.com/users/yihui/events{/privacy}","received_events_url":"https://api.github.com/users/yihui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yihui/knitr","description":"A general-purpose tool for dynamic report generation in R","fork":false,"url":"https://api.github.com/repos/yihui/knitr","forks_url":"https://api.github.com/repos/yihui/knitr/forks","keys_url":"https://api.github.com/repos/yihui/knitr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yihui/knitr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yihui/knitr/teams","hooks_url":"https://api.github.com/repos/yihui/knitr/hooks","issue_events_url":"https://api.github.com/repos/yihui/knitr/issues/events{/number}","events_url":"https://api.github.com/repos/yihui/knitr/events","assignees_url":"https://api.github.com/repos/yihui/knitr/assignees{/user}","branches_url":"https://api.github.com/repos/yihui/knitr/branches{/branch}","tags_url":"https://api.github.com/repos/yihui/knitr/tags","blobs_url":"https://api.github.com/repos/yihui/knitr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yihui/knitr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yihui/knitr/git/refs{/sha}","trees_url":"https://api.github.com/repos/yihui/knitr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yihui/knitr/statuses/{sha}","languages_url":"https://api.github.com/repos/yihui/knitr/languages","stargazers_url":"https://api.github.com/repos/yihui/knitr/stargazers","contributors_url":"https://api.github.com/repos/yihui/knitr/contributors","subscribers_url":"https://api.github.com/repos/yihui/knitr/subscribers","subscription_url":"https://api.github.com/repos/yihui/knitr/subscription","commits_url":"https://api.github.com/repos/yihui/knitr/commits{/sha}","git_commits_url":"https://api.github.com/repos/yihui/knitr/git/commits{/sha}","comments_url":"https://api.github.com/repos/yihui/knitr/comments{/number}","issue_comment_url":"https://api.github.com/repos/yihui/knitr/issues/comments{/number}","contents_url":"https://api.github.com/repos/yihui/knitr/contents/{+path}","compare_url":"https://api.github.com/repos/yihui/knitr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yihui/knitr/merges","archive_url":"https://api.github.com/repos/yihui/knitr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yihui/knitr/downloads","issues_url":"https://api.github.com/repos/yihui/knitr/issues{/number}","pulls_url":"https://api.github.com/repos/yihui/knitr/pulls{/number}","milestones_url":"https://api.github.com/repos/yihui/knitr/milestones{/number}","notifications_url":"https://api.github.com/repos/yihui/knitr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yihui/knitr/labels{/name}","releases_url":"https://api.github.com/repos/yihui/knitr/releases{/id}","deployments_url":"https://api.github.com/repos/yihui/knitr/deployments","created_at":"2011-10-17T20:09:04Z","updated_at":"2017-07-10T22:06:05Z","pushed_at":"2017-07-13T14:59:52Z","git_url":"git://github.com/yihui/knitr.git","ssh_url":"git@github.com:yihui/knitr.git","clone_url":"https://github.com/yihui/knitr.git","svn_url":"https://github.com/yihui/knitr","homepage":"https://yihui.name/knitr","size":6539,"stargazers_count":1382,"watchers_count":1382,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":642,"mirror_url":null,"open_issues_count":30,"forks":642,"open_issues":30,"watchers":1382,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yihui/knitr/pulls/1416"},"html":{"href":"https://github.com/yihui/knitr/pull/1416"},"issue":{"href":"https://api.github.com/repos/yihui/knitr/issues/1416"},"comments":{"href":"https://api.github.com/repos/yihui/knitr/issues/1416/comments"},"review_comments":{"href":"https://api.github.com/repos/yihui/knitr/pulls/1416/comments"},"review_comment":{"href":"https://api.github.com/repos/yihui/knitr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yihui/knitr/pulls/1416/commits"},"statuses":{"href":"https://api.github.com/repos/yihui/knitr/statuses/50203535ccd4c1c4623d979d1249fd464539cac0"}}}}
{"actor":{"display_login":"yihui"}}