{"action":"opened","number":82,"pull_request":{"url":"https://api.github.com/repos/thlorenz/doctoc/pulls/82","id":43094753,"html_url":"https://github.com/thlorenz/doctoc/pull/82","diff_url":"https://github.com/thlorenz/doctoc/pull/82.diff","patch_url":"https://github.com/thlorenz/doctoc/pull/82.patch","issue_url":"https://api.github.com/repos/thlorenz/doctoc/issues/82","number":82,"state":"open","locked":false,"title":"strip code blocks before parsing headers - #38","user":{"login":"yomed","id":3595986,"avatar_url":"https://avatars.githubusercontent.com/u/3595986?v=3","gravatar_id":"","url":"https://api.github.com/users/yomed","html_url":"https://github.com/yomed","followers_url":"https://api.github.com/users/yomed/followers","following_url":"https://api.github.com/users/yomed/following{/other_user}","gists_url":"https://api.github.com/users/yomed/gists{/gist_id}","starred_url":"https://api.github.com/users/yomed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomed/subscriptions","organizations_url":"https://api.github.com/users/yomed/orgs","repos_url":"https://api.github.com/users/yomed/repos","events_url":"https://api.github.com/users/yomed/events{/privacy}","received_events_url":"https://api.github.com/users/yomed/received_events","type":"User","site_admin":false},"body":"I've fixed #38 by stripping out the 4 types of markdown code blocks before parsing headers. In doing this, I removed the previous method which filtered out triple-backticked lines during parsing (was only done for parsing hashed headers). Test case included. Let me know if you'd prefer fixing this in some other way.","created_at":"2015-08-22T01:20:45Z","updated_at":"2015-08-22T01:20:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thlorenz/doctoc/pulls/82/commits","review_comments_url":"https://api.github.com/repos/thlorenz/doctoc/pulls/82/comments","review_comment_url":"https://api.github.com/repos/thlorenz/doctoc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thlorenz/doctoc/issues/82/comments","statuses_url":"https://api.github.com/repos/thlorenz/doctoc/statuses/ab6b3caa2194bae4d7352a7e156770e7197a39dd","head":{"label":"yomed:issue-38","ref":"issue-38","sha":"ab6b3caa2194bae4d7352a7e156770e7197a39dd","user":{"login":"yomed","id":3595986,"avatar_url":"https://avatars.githubusercontent.com/u/3595986?v=3","gravatar_id":"","url":"https://api.github.com/users/yomed","html_url":"https://github.com/yomed","followers_url":"https://api.github.com/users/yomed/followers","following_url":"https://api.github.com/users/yomed/following{/other_user}","gists_url":"https://api.github.com/users/yomed/gists{/gist_id}","starred_url":"https://api.github.com/users/yomed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomed/subscriptions","organizations_url":"https://api.github.com/users/yomed/orgs","repos_url":"https://api.github.com/users/yomed/repos","events_url":"https://api.github.com/users/yomed/events{/privacy}","received_events_url":"https://api.github.com/users/yomed/received_events","type":"User","site_admin":false},"repo":{"id":41182321,"name":"doctoc","full_name":"yomed/doctoc","owner":{"login":"yomed","id":3595986,"avatar_url":"https://avatars.githubusercontent.com/u/3595986?v=3","gravatar_id":"","url":"https://api.github.com/users/yomed","html_url":"https://github.com/yomed","followers_url":"https://api.github.com/users/yomed/followers","following_url":"https://api.github.com/users/yomed/following{/other_user}","gists_url":"https://api.github.com/users/yomed/gists{/gist_id}","starred_url":"https://api.github.com/users/yomed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomed/subscriptions","organizations_url":"https://api.github.com/users/yomed/orgs","repos_url":"https://api.github.com/users/yomed/repos","events_url":"https://api.github.com/users/yomed/events{/privacy}","received_events_url":"https://api.github.com/users/yomed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yomed/doctoc","description":"Generates table of contents for markdown files inside local git repository. Links are compatible with anchors generated by github or other sites.","fork":true,"url":"https://api.github.com/repos/yomed/doctoc","forks_url":"https://api.github.com/repos/yomed/doctoc/forks","keys_url":"https://api.github.com/repos/yomed/doctoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yomed/doctoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yomed/doctoc/teams","hooks_url":"https://api.github.com/repos/yomed/doctoc/hooks","issue_events_url":"https://api.github.com/repos/yomed/doctoc/issues/events{/number}","events_url":"https://api.github.com/repos/yomed/doctoc/events","assignees_url":"https://api.github.com/repos/yomed/doctoc/assignees{/user}","branches_url":"https://api.github.com/repos/yomed/doctoc/branches{/branch}","tags_url":"https://api.github.com/repos/yomed/doctoc/tags","blobs_url":"https://api.github.com/repos/yomed/doctoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yomed/doctoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yomed/doctoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/yomed/doctoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yomed/doctoc/statuses/{sha}","languages_url":"https://api.github.com/repos/yomed/doctoc/languages","stargazers_url":"https://api.github.com/repos/yomed/doctoc/stargazers","contributors_url":"https://api.github.com/repos/yomed/doctoc/contributors","subscribers_url":"https://api.github.com/repos/yomed/doctoc/subscribers","subscription_url":"https://api.github.com/repos/yomed/doctoc/subscription","commits_url":"https://api.github.com/repos/yomed/doctoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/yomed/doctoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/yomed/doctoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/yomed/doctoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/yomed/doctoc/contents/{+path}","compare_url":"https://api.github.com/repos/yomed/doctoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yomed/doctoc/merges","archive_url":"https://api.github.com/repos/yomed/doctoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yomed/doctoc/downloads","issues_url":"https://api.github.com/repos/yomed/doctoc/issues{/number}","pulls_url":"https://api.github.com/repos/yomed/doctoc/pulls{/number}","milestones_url":"https://api.github.com/repos/yomed/doctoc/milestones{/number}","notifications_url":"https://api.github.com/repos/yomed/doctoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yomed/doctoc/labels{/name}","releases_url":"https://api.github.com/repos/yomed/doctoc/releases{/id}","created_at":"2015-08-21T23:46:48Z","updated_at":"2015-08-21T23:46:48Z","pushed_at":"2015-08-22T01:17:33Z","git_url":"git://github.com/yomed/doctoc.git","ssh_url":"git@github.com:yomed/doctoc.git","clone_url":"https://github.com/yomed/doctoc.git","svn_url":"https://github.com/yomed/doctoc","homepage":"https://www.npmjs.com/package/doctoc","size":666,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"thlorenz:master","ref":"master","sha":"bb4968bc6795358d5f35f313393858dcc8b5c61f","user":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars.githubusercontent.com/u/192891?v=3","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"repo":{"id":4459367,"name":"doctoc","full_name":"thlorenz/doctoc","owner":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars.githubusercontent.com/u/192891?v=3","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thlorenz/doctoc","description":"Generates table of contents for markdown files inside local git repository. Links are compatible with anchors generated by github or other sites.","fork":false,"url":"https://api.github.com/repos/thlorenz/doctoc","forks_url":"https://api.github.com/repos/thlorenz/doctoc/forks","keys_url":"https://api.github.com/repos/thlorenz/doctoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thlorenz/doctoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thlorenz/doctoc/teams","hooks_url":"https://api.github.com/repos/thlorenz/doctoc/hooks","issue_events_url":"https://api.github.com/repos/thlorenz/doctoc/issues/events{/number}","events_url":"https://api.github.com/repos/thlorenz/doctoc/events","assignees_url":"https://api.github.com/repos/thlorenz/doctoc/assignees{/user}","branches_url":"https://api.github.com/repos/thlorenz/doctoc/branches{/branch}","tags_url":"https://api.github.com/repos/thlorenz/doctoc/tags","blobs_url":"https://api.github.com/repos/thlorenz/doctoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thlorenz/doctoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thlorenz/doctoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/thlorenz/doctoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thlorenz/doctoc/statuses/{sha}","languages_url":"https://api.github.com/repos/thlorenz/doctoc/languages","stargazers_url":"https://api.github.com/repos/thlorenz/doctoc/stargazers","contributors_url":"https://api.github.com/repos/thlorenz/doctoc/contributors","subscribers_url":"https://api.github.com/repos/thlorenz/doctoc/subscribers","subscription_url":"https://api.github.com/repos/thlorenz/doctoc/subscription","commits_url":"https://api.github.com/repos/thlorenz/doctoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/thlorenz/doctoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/thlorenz/doctoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/thlorenz/doctoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/thlorenz/doctoc/contents/{+path}","compare_url":"https://api.github.com/repos/thlorenz/doctoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thlorenz/doctoc/merges","archive_url":"https://api.github.com/repos/thlorenz/doctoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thlorenz/doctoc/downloads","issues_url":"https://api.github.com/repos/thlorenz/doctoc/issues{/number}","pulls_url":"https://api.github.com/repos/thlorenz/doctoc/pulls{/number}","milestones_url":"https://api.github.com/repos/thlorenz/doctoc/milestones{/number}","notifications_url":"https://api.github.com/repos/thlorenz/doctoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thlorenz/doctoc/labels{/name}","releases_url":"https://api.github.com/repos/thlorenz/doctoc/releases{/id}","created_at":"2012-05-27T02:27:43Z","updated_at":"2015-08-20T15:41:15Z","pushed_at":"2015-08-12T18:00:48Z","git_url":"git://github.com/thlorenz/doctoc.git","ssh_url":"git@github.com:thlorenz/doctoc.git","clone_url":"https://github.com/thlorenz/doctoc.git","svn_url":"https://github.com/thlorenz/doctoc","homepage":"https://www.npmjs.com/package/doctoc","size":666,"stargazers_count":402,"watchers_count":402,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":100,"mirror_url":null,"open_issues_count":11,"forks":100,"open_issues":11,"watchers":402,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thlorenz/doctoc/pulls/82"},"html":{"href":"https://github.com/thlorenz/doctoc/pull/82"},"issue":{"href":"https://api.github.com/repos/thlorenz/doctoc/issues/82"},"comments":{"href":"https://api.github.com/repos/thlorenz/doctoc/issues/82/comments"},"review_comments":{"href":"https://api.github.com/repos/thlorenz/doctoc/pulls/82/comments"},"review_comment":{"href":"https://api.github.com/repos/thlorenz/doctoc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thlorenz/doctoc/pulls/82/commits"},"statuses":{"href":"https://api.github.com/repos/thlorenz/doctoc/statuses/ab6b3caa2194bae4d7352a7e156770e7197a39dd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":73,"deletions":9,"changed_files":3}}