{"action":"created","comment":{"url":"https://api.github.com/repos/nanoc/nanoc/pulls/comments/46089232","id":46089232,"diff_hunk":"@@ -88,8 +88,23 @@ def link_to_unless_current(text, target, attributes = {})\n       path = target.is_a?(String) ? target : target.path\n \n       if @item_rep && @item_rep.path == path\n+        active_class = attributes[:active_class] || 'active'\n+        attributes.delete :active_class","path":"lib/nanoc/helpers/link_to.rb","position":5,"original_position":5,"commit_id":"cb587ae5e31f2d79dd2270abc822f019f0f2fd1a","original_commit_id":"cb587ae5e31f2d79dd2270abc822f019f0f2fd1a","user":{"login":"ddfreyne","id":6269,"avatar_url":"https://avatars.githubusercontent.com/u/6269?v=3","gravatar_id":"","url":"https://api.github.com/users/ddfreyne","html_url":"https://github.com/ddfreyne","followers_url":"https://api.github.com/users/ddfreyne/followers","following_url":"https://api.github.com/users/ddfreyne/following{/other_user}","gists_url":"https://api.github.com/users/ddfreyne/gists{/gist_id}","starred_url":"https://api.github.com/users/ddfreyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddfreyne/subscriptions","organizations_url":"https://api.github.com/users/ddfreyne/orgs","repos_url":"https://api.github.com/users/ddfreyne/repos","events_url":"https://api.github.com/users/ddfreyne/events{/privacy}","received_events_url":"https://api.github.com/users/ddfreyne/received_events","type":"User","site_admin":false},"body":"Don’t mutate `attributes`.","created_at":"2015-11-29T08:56:22Z","updated_at":"2015-11-29T08:56:22Z","html_url":"https://github.com/nanoc/nanoc/pull/743#discussion_r46089232","pull_request_url":"https://api.github.com/repos/nanoc/nanoc/pulls/743","_links":{"self":{"href":"https://api.github.com/repos/nanoc/nanoc/pulls/comments/46089232"},"html":{"href":"https://github.com/nanoc/nanoc/pull/743#discussion_r46089232"},"pull_request":{"href":"https://api.github.com/repos/nanoc/nanoc/pulls/743"}}},"pull_request":{"url":"https://api.github.com/repos/nanoc/nanoc/pulls/743","id":52049904,"html_url":"https://github.com/nanoc/nanoc/pull/743","diff_url":"https://github.com/nanoc/nanoc/pull/743.diff","patch_url":"https://github.com/nanoc/nanoc/pull/743.patch","issue_url":"https://api.github.com/repos/nanoc/nanoc/issues/743","number":743,"state":"open","locked":false,"title":"link_to_unless_current","user":{"login":"lvuotto","id":4440135,"avatar_url":"https://avatars.githubusercontent.com/u/4440135?v=3","gravatar_id":"","url":"https://api.github.com/users/lvuotto","html_url":"https://github.com/lvuotto","followers_url":"https://api.github.com/users/lvuotto/followers","following_url":"https://api.github.com/users/lvuotto/following{/other_user}","gists_url":"https://api.github.com/users/lvuotto/gists{/gist_id}","starred_url":"https://api.github.com/users/lvuotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvuotto/subscriptions","organizations_url":"https://api.github.com/users/lvuotto/orgs","repos_url":"https://api.github.com/users/lvuotto/repos","events_url":"https://api.github.com/users/lvuotto/events{/privacy}","received_events_url":"https://api.github.com/users/lvuotto/received_events","type":"User","site_admin":false},"body":"Fixs #737.\r\n\r\n`attributes` hash now accepts an `:active_class` key which defaults to `'active'` and, if it links to the current page, it's merged with `attributes`' `:class` key and removed from the hash.","created_at":"2015-11-28T22:32:45Z","updated_at":"2015-11-29T08:56:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"653fdc05d94fcc5e3a29286222fbb1d506f4ac05","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nanoc/nanoc/pulls/743/commits","review_comments_url":"https://api.github.com/repos/nanoc/nanoc/pulls/743/comments","review_comment_url":"https://api.github.com/repos/nanoc/nanoc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nanoc/nanoc/issues/743/comments","statuses_url":"https://api.github.com/repos/nanoc/nanoc/statuses/cb587ae5e31f2d79dd2270abc822f019f0f2fd1a","head":{"label":"lvuotto:link_to","ref":"link_to","sha":"cb587ae5e31f2d79dd2270abc822f019f0f2fd1a","user":{"login":"lvuotto","id":4440135,"avatar_url":"https://avatars.githubusercontent.com/u/4440135?v=3","gravatar_id":"","url":"https://api.github.com/users/lvuotto","html_url":"https://github.com/lvuotto","followers_url":"https://api.github.com/users/lvuotto/followers","following_url":"https://api.github.com/users/lvuotto/following{/other_user}","gists_url":"https://api.github.com/users/lvuotto/gists{/gist_id}","starred_url":"https://api.github.com/users/lvuotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvuotto/subscriptions","organizations_url":"https://api.github.com/users/lvuotto/orgs","repos_url":"https://api.github.com/users/lvuotto/repos","events_url":"https://api.github.com/users/lvuotto/events{/privacy}","received_events_url":"https://api.github.com/users/lvuotto/received_events","type":"User","site_admin":false},"repo":{"id":47002575,"name":"nanoc","full_name":"lvuotto/nanoc","owner":{"login":"lvuotto","id":4440135,"avatar_url":"https://avatars.githubusercontent.com/u/4440135?v=3","gravatar_id":"","url":"https://api.github.com/users/lvuotto","html_url":"https://github.com/lvuotto","followers_url":"https://api.github.com/users/lvuotto/followers","following_url":"https://api.github.com/users/lvuotto/following{/other_user}","gists_url":"https://api.github.com/users/lvuotto/gists{/gist_id}","starred_url":"https://api.github.com/users/lvuotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvuotto/subscriptions","organizations_url":"https://api.github.com/users/lvuotto/orgs","repos_url":"https://api.github.com/users/lvuotto/repos","events_url":"https://api.github.com/users/lvuotto/events{/privacy}","received_events_url":"https://api.github.com/users/lvuotto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lvuotto/nanoc","description":"nanoc is a web publishing system written in Ruby.","fork":true,"url":"https://api.github.com/repos/lvuotto/nanoc","forks_url":"https://api.github.com/repos/lvuotto/nanoc/forks","keys_url":"https://api.github.com/repos/lvuotto/nanoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lvuotto/nanoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lvuotto/nanoc/teams","hooks_url":"https://api.github.com/repos/lvuotto/nanoc/hooks","issue_events_url":"https://api.github.com/repos/lvuotto/nanoc/issues/events{/number}","events_url":"https://api.github.com/repos/lvuotto/nanoc/events","assignees_url":"https://api.github.com/repos/lvuotto/nanoc/assignees{/user}","branches_url":"https://api.github.com/repos/lvuotto/nanoc/branches{/branch}","tags_url":"https://api.github.com/repos/lvuotto/nanoc/tags","blobs_url":"https://api.github.com/repos/lvuotto/nanoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lvuotto/nanoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lvuotto/nanoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/lvuotto/nanoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lvuotto/nanoc/statuses/{sha}","languages_url":"https://api.github.com/repos/lvuotto/nanoc/languages","stargazers_url":"https://api.github.com/repos/lvuotto/nanoc/stargazers","contributors_url":"https://api.github.com/repos/lvuotto/nanoc/contributors","subscribers_url":"https://api.github.com/repos/lvuotto/nanoc/subscribers","subscription_url":"https://api.github.com/repos/lvuotto/nanoc/subscription","commits_url":"https://api.github.com/repos/lvuotto/nanoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/lvuotto/nanoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/lvuotto/nanoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/lvuotto/nanoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/lvuotto/nanoc/contents/{+path}","compare_url":"https://api.github.com/repos/lvuotto/nanoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lvuotto/nanoc/merges","archive_url":"https://api.github.com/repos/lvuotto/nanoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lvuotto/nanoc/downloads","issues_url":"https://api.github.com/repos/lvuotto/nanoc/issues{/number}","pulls_url":"https://api.github.com/repos/lvuotto/nanoc/pulls{/number}","milestones_url":"https://api.github.com/repos/lvuotto/nanoc/milestones{/number}","notifications_url":"https://api.github.com/repos/lvuotto/nanoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lvuotto/nanoc/labels{/name}","releases_url":"https://api.github.com/repos/lvuotto/nanoc/releases{/id}","created_at":"2015-11-27T23:07:24Z","updated_at":"2015-11-27T23:07:26Z","pushed_at":"2015-11-28T22:26:59Z","git_url":"git://github.com/lvuotto/nanoc.git","ssh_url":"git@github.com:lvuotto/nanoc.git","clone_url":"https://github.com/lvuotto/nanoc.git","svn_url":"https://github.com/lvuotto/nanoc","homepage":"http://nanoc.ws/","size":10132,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"nanoc:master","ref":"master","sha":"417f462a26d50c81109d7b74fcde96ffd9b69fa4","user":{"login":"nanoc","id":3260163,"avatar_url":"https://avatars.githubusercontent.com/u/3260163?v=3","gravatar_id":"","url":"https://api.github.com/users/nanoc","html_url":"https://github.com/nanoc","followers_url":"https://api.github.com/users/nanoc/followers","following_url":"https://api.github.com/users/nanoc/following{/other_user}","gists_url":"https://api.github.com/users/nanoc/gists{/gist_id}","starred_url":"https://api.github.com/users/nanoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanoc/subscriptions","organizations_url":"https://api.github.com/users/nanoc/orgs","repos_url":"https://api.github.com/users/nanoc/repos","events_url":"https://api.github.com/users/nanoc/events{/privacy}","received_events_url":"https://api.github.com/users/nanoc/received_events","type":"Organization","site_admin":false},"repo":{"id":253476,"name":"nanoc","full_name":"nanoc/nanoc","owner":{"login":"nanoc","id":3260163,"avatar_url":"https://avatars.githubusercontent.com/u/3260163?v=3","gravatar_id":"","url":"https://api.github.com/users/nanoc","html_url":"https://github.com/nanoc","followers_url":"https://api.github.com/users/nanoc/followers","following_url":"https://api.github.com/users/nanoc/following{/other_user}","gists_url":"https://api.github.com/users/nanoc/gists{/gist_id}","starred_url":"https://api.github.com/users/nanoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanoc/subscriptions","organizations_url":"https://api.github.com/users/nanoc/orgs","repos_url":"https://api.github.com/users/nanoc/repos","events_url":"https://api.github.com/users/nanoc/events{/privacy}","received_events_url":"https://api.github.com/users/nanoc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nanoc/nanoc","description":"nanoc is a web publishing system written in Ruby.","fork":false,"url":"https://api.github.com/repos/nanoc/nanoc","forks_url":"https://api.github.com/repos/nanoc/nanoc/forks","keys_url":"https://api.github.com/repos/nanoc/nanoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nanoc/nanoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nanoc/nanoc/teams","hooks_url":"https://api.github.com/repos/nanoc/nanoc/hooks","issue_events_url":"https://api.github.com/repos/nanoc/nanoc/issues/events{/number}","events_url":"https://api.github.com/repos/nanoc/nanoc/events","assignees_url":"https://api.github.com/repos/nanoc/nanoc/assignees{/user}","branches_url":"https://api.github.com/repos/nanoc/nanoc/branches{/branch}","tags_url":"https://api.github.com/repos/nanoc/nanoc/tags","blobs_url":"https://api.github.com/repos/nanoc/nanoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nanoc/nanoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nanoc/nanoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/nanoc/nanoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nanoc/nanoc/statuses/{sha}","languages_url":"https://api.github.com/repos/nanoc/nanoc/languages","stargazers_url":"https://api.github.com/repos/nanoc/nanoc/stargazers","contributors_url":"https://api.github.com/repos/nanoc/nanoc/contributors","subscribers_url":"https://api.github.com/repos/nanoc/nanoc/subscribers","subscription_url":"https://api.github.com/repos/nanoc/nanoc/subscription","commits_url":"https://api.github.com/repos/nanoc/nanoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/nanoc/nanoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/nanoc/nanoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/nanoc/nanoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/nanoc/nanoc/contents/{+path}","compare_url":"https://api.github.com/repos/nanoc/nanoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nanoc/nanoc/merges","archive_url":"https://api.github.com/repos/nanoc/nanoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nanoc/nanoc/downloads","issues_url":"https://api.github.com/repos/nanoc/nanoc/issues{/number}","pulls_url":"https://api.github.com/repos/nanoc/nanoc/pulls{/number}","milestones_url":"https://api.github.com/repos/nanoc/nanoc/milestones{/number}","notifications_url":"https://api.github.com/repos/nanoc/nanoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nanoc/nanoc/labels{/name}","releases_url":"https://api.github.com/repos/nanoc/nanoc/releases{/id}","created_at":"2009-07-17T11:28:53Z","updated_at":"2015-11-28T18:01:09Z","pushed_at":"2015-11-28T22:32:45Z","git_url":"git://github.com/nanoc/nanoc.git","ssh_url":"git@github.com:nanoc/nanoc.git","clone_url":"https://github.com/nanoc/nanoc.git","svn_url":"https://github.com/nanoc/nanoc","homepage":"http://nanoc.ws/","size":11501,"stargazers_count":1230,"watchers_count":1230,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":189,"mirror_url":null,"open_issues_count":14,"forks":189,"open_issues":14,"watchers":1230,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nanoc/nanoc/pulls/743"},"html":{"href":"https://github.com/nanoc/nanoc/pull/743"},"issue":{"href":"https://api.github.com/repos/nanoc/nanoc/issues/743"},"comments":{"href":"https://api.github.com/repos/nanoc/nanoc/issues/743/comments"},"review_comments":{"href":"https://api.github.com/repos/nanoc/nanoc/pulls/743/comments"},"review_comment":{"href":"https://api.github.com/repos/nanoc/nanoc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nanoc/nanoc/pulls/743/commits"},"statuses":{"href":"https://api.github.com/repos/nanoc/nanoc/statuses/cb587ae5e31f2d79dd2270abc822f019f0f2fd1a"}}}}