{"action":"created","comment":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/comments/191673996","pull_request_review_id":124287451,"id":191673996,"diff_hunk":"@@ -1,3 +1,6 @@\n+<% if not table.caption and labels -%>\n+\\phantomsection<%= labels -%>\n+<% endif -%>\n \\begin{savenotes}\\sphinxatlongtablestart\\begin{longtable}","path":"sphinx/templates/latex/longtable.tex_t","position":4,"original_position":4,"commit_id":"94d4fe22af2cd6434e2026702eb6e9d6adbb47e8","original_commit_id":"94d4fe22af2cd6434e2026702eb6e9d6adbb47e8","user":{"login":"jfbu","id":2589111,"avatar_url":"https://avatars0.githubusercontent.com/u/2589111?v=4","gravatar_id":"","url":"https://api.github.com/users/jfbu","html_url":"https://github.com/jfbu","followers_url":"https://api.github.com/users/jfbu/followers","following_url":"https://api.github.com/users/jfbu/following{/other_user}","gists_url":"https://api.github.com/users/jfbu/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbu/subscriptions","organizations_url":"https://api.github.com/users/jfbu/orgs","repos_url":"https://api.github.com/users/jfbu/repos","events_url":"https://api.github.com/users/jfbu/events{/privacy}","received_events_url":"https://api.github.com/users/jfbu/received_events","type":"User","site_admin":false},"body":"ah sorry my diff was swallowing `\\hline` in case of neither caption nor labels, here is corrected one:\r\n\r\n```diff\r\ndiff --git a/sphinx/templates/latex/longtable.tex_t b/sphinx/templates/latex/longtable.tex_t\r\nindex 2c9e034b9..60e0a54ee 100644\r\n--- a/sphinx/templates/latex/longtable.tex_t\r\n+++ b/sphinx/templates/latex/longtable.tex_t\r\n@@ -1,6 +1,3 @@\r\n-<% if not table.caption and labels -%>\r\n-\\phantomsection<%= labels -%>\r\n-<% endif -%>\r\n \\begin{savenotes}\\sphinxatlongtablestart\\begin{longtable}\r\n <%- if table.align == 'center' -%>\r\n   [c]\r\n@@ -12,8 +9,12 @@\r\n <%= table.get_colspec() %>\r\n <%- if table.caption -%>\r\n \\caption{<%= ''.join(table.caption) %>\\strut}<%= labels %>\\\\*[\\sphinxlongtablecapskipadjust]\r\n-<% endif -%>\r\n \\hline\r\n+<%- elif labels -%>\r\n+\\hline\\noalign{\\phantomsection<%= labels %>}%\r\n+<%- else -%>\r\n+\\hline\r\n+<%- endif -%>\r\n <%= ''.join(table.header) %>\r\n \\endfirsthead\r\n \r\n```\r\n","created_at":"2018-05-30T07:59:17Z","updated_at":"2018-05-30T07:59:17Z","html_url":"https://github.com/sphinx-doc/sphinx/pull/5012#discussion_r191673996","pull_request_url":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/5012","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/comments/191673996"},"html":{"href":"https://github.com/sphinx-doc/sphinx/pull/5012#discussion_r191673996"},"pull_request":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/5012"}},"in_reply_to_id":190718273},"pull_request":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/5012","id":190311300,"html_url":"https://github.com/sphinx-doc/sphinx/pull/5012","diff_url":"https://github.com/sphinx-doc/sphinx/pull/5012.diff","patch_url":"https://github.com/sphinx-doc/sphinx/pull/5012.patch","issue_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/5012","number":5012,"state":"open","locked":false,"title":"Fix #5009: latex: a label for table is vanished if table does not have a caption","user":{"login":"tk0miya","id":748828,"avatar_url":"https://avatars2.githubusercontent.com/u/748828?v=4","gravatar_id":"","url":"https://api.github.com/users/tk0miya","html_url":"https://github.com/tk0miya","followers_url":"https://api.github.com/users/tk0miya/followers","following_url":"https://api.github.com/users/tk0miya/following{/other_user}","gists_url":"https://api.github.com/users/tk0miya/gists{/gist_id}","starred_url":"https://api.github.com/users/tk0miya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk0miya/subscriptions","organizations_url":"https://api.github.com/users/tk0miya/orgs","repos_url":"https://api.github.com/users/tk0miya/repos","events_url":"https://api.github.com/users/tk0miya/events{/privacy}","received_events_url":"https://api.github.com/users/tk0miya/received_events","type":"User","site_admin":false},"body":"### Feature or Bugfix\r\n- Bugfix\r\n\r\n### Purpose\r\n- refs: #5009 ","created_at":"2018-05-24T14:32:09Z","updated_at":"2018-05-30T07:59:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c612a0c5de2d42da5445885089e1ef6c015ff319","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":162407993,"url":"https://api.github.com/repos/sphinx-doc/sphinx/labels/bug","name":"bug","color":"a11d21","default":true},{"id":162416101,"url":"https://api.github.com/repos/sphinx-doc/sphinx/labels/latex","name":"latex","color":"FFFFFF","default":false}],"milestone":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/milestones/47","html_url":"https://github.com/sphinx-doc/sphinx/milestone/47","labels_url":"https://api.github.com/repos/sphinx-doc/sphinx/milestones/47/labels","id":3364498,"number":47,"title":"1.7.6","description":"Not planned yet.","creator":{"login":"tk0miya","id":748828,"avatar_url":"https://avatars2.githubusercontent.com/u/748828?v=4","gravatar_id":"","url":"https://api.github.com/users/tk0miya","html_url":"https://github.com/tk0miya","followers_url":"https://api.github.com/users/tk0miya/followers","following_url":"https://api.github.com/users/tk0miya/following{/other_user}","gists_url":"https://api.github.com/users/tk0miya/gists{/gist_id}","starred_url":"https://api.github.com/users/tk0miya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk0miya/subscriptions","organizations_url":"https://api.github.com/users/tk0miya/orgs","repos_url":"https://api.github.com/users/tk0miya/repos","events_url":"https://api.github.com/users/tk0miya/events{/privacy}","received_events_url":"https://api.github.com/users/tk0miya/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":0,"state":"open","created_at":"2018-05-22T13:11:35Z","updated_at":"2018-05-29T01:49:11Z","due_on":"2018-07-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/5012/commits","review_comments_url":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/5012/comments","review_comment_url":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/5012/comments","statuses_url":"https://api.github.com/repos/sphinx-doc/sphinx/statuses/94d4fe22af2cd6434e2026702eb6e9d6adbb47e8","head":{"label":"tk0miya:5009_label_for_table_on_latex","ref":"5009_label_for_table_on_latex","sha":"94d4fe22af2cd6434e2026702eb6e9d6adbb47e8","user":{"login":"tk0miya","id":748828,"avatar_url":"https://avatars2.githubusercontent.com/u/748828?v=4","gravatar_id":"","url":"https://api.github.com/users/tk0miya","html_url":"https://github.com/tk0miya","followers_url":"https://api.github.com/users/tk0miya/followers","following_url":"https://api.github.com/users/tk0miya/following{/other_user}","gists_url":"https://api.github.com/users/tk0miya/gists{/gist_id}","starred_url":"https://api.github.com/users/tk0miya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk0miya/subscriptions","organizations_url":"https://api.github.com/users/tk0miya/orgs","repos_url":"https://api.github.com/users/tk0miya/repos","events_url":"https://api.github.com/users/tk0miya/events{/privacy}","received_events_url":"https://api.github.com/users/tk0miya/received_events","type":"User","site_admin":false},"repo":{"id":48524066,"name":"sphinx","full_name":"tk0miya/sphinx","owner":{"login":"tk0miya","id":748828,"avatar_url":"https://avatars2.githubusercontent.com/u/748828?v=4","gravatar_id":"","url":"https://api.github.com/users/tk0miya","html_url":"https://github.com/tk0miya","followers_url":"https://api.github.com/users/tk0miya/followers","following_url":"https://api.github.com/users/tk0miya/following{/other_user}","gists_url":"https://api.github.com/users/tk0miya/gists{/gist_id}","starred_url":"https://api.github.com/users/tk0miya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk0miya/subscriptions","organizations_url":"https://api.github.com/users/tk0miya/orgs","repos_url":"https://api.github.com/users/tk0miya/repos","events_url":"https://api.github.com/users/tk0miya/events{/privacy}","received_events_url":"https://api.github.com/users/tk0miya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tk0miya/sphinx","description":"Main repository for the Sphinx documentation builder","fork":true,"url":"https://api.github.com/repos/tk0miya/sphinx","forks_url":"https://api.github.com/repos/tk0miya/sphinx/forks","keys_url":"https://api.github.com/repos/tk0miya/sphinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tk0miya/sphinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tk0miya/sphinx/teams","hooks_url":"https://api.github.com/repos/tk0miya/sphinx/hooks","issue_events_url":"https://api.github.com/repos/tk0miya/sphinx/issues/events{/number}","events_url":"https://api.github.com/repos/tk0miya/sphinx/events","assignees_url":"https://api.github.com/repos/tk0miya/sphinx/assignees{/user}","branches_url":"https://api.github.com/repos/tk0miya/sphinx/branches{/branch}","tags_url":"https://api.github.com/repos/tk0miya/sphinx/tags","blobs_url":"https://api.github.com/repos/tk0miya/sphinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tk0miya/sphinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tk0miya/sphinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/tk0miya/sphinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tk0miya/sphinx/statuses/{sha}","languages_url":"https://api.github.com/repos/tk0miya/sphinx/languages","stargazers_url":"https://api.github.com/repos/tk0miya/sphinx/stargazers","contributors_url":"https://api.github.com/repos/tk0miya/sphinx/contributors","subscribers_url":"https://api.github.com/repos/tk0miya/sphinx/subscribers","subscription_url":"https://api.github.com/repos/tk0miya/sphinx/subscription","commits_url":"https://api.github.com/repos/tk0miya/sphinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/tk0miya/sphinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/tk0miya/sphinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/tk0miya/sphinx/issues/comments{/number}","contents_url":"https://api.github.com/repos/tk0miya/sphinx/contents/{+path}","compare_url":"https://api.github.com/repos/tk0miya/sphinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tk0miya/sphinx/merges","archive_url":"https://api.github.com/repos/tk0miya/sphinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tk0miya/sphinx/downloads","issues_url":"https://api.github.com/repos/tk0miya/sphinx/issues{/number}","pulls_url":"https://api.github.com/repos/tk0miya/sphinx/pulls{/number}","milestones_url":"https://api.github.com/repos/tk0miya/sphinx/milestones{/number}","notifications_url":"https://api.github.com/repos/tk0miya/sphinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tk0miya/sphinx/labels{/name}","releases_url":"https://api.github.com/repos/tk0miya/sphinx/releases{/id}","deployments_url":"https://api.github.com/repos/tk0miya/sphinx/deployments","created_at":"2015-12-24T04:03:04Z","updated_at":"2016-06-03T13:54:25Z","pushed_at":"2018-05-28T16:25:49Z","git_url":"git://github.com/tk0miya/sphinx.git","ssh_url":"git@github.com:tk0miya/sphinx.git","clone_url":"https://github.com/tk0miya/sphinx.git","svn_url":"https://github.com/tk0miya/sphinx","homepage":"http://sphinx-doc.org","size":27787,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sphinx-doc:1.7","ref":"1.7","sha":"4935d4483a3004c81c894ce10c63133b1b28bead","user":{"login":"sphinx-doc","id":9928167,"avatar_url":"https://avatars2.githubusercontent.com/u/9928167?v=4","gravatar_id":"","url":"https://api.github.com/users/sphinx-doc","html_url":"https://github.com/sphinx-doc","followers_url":"https://api.github.com/users/sphinx-doc/followers","following_url":"https://api.github.com/users/sphinx-doc/following{/other_user}","gists_url":"https://api.github.com/users/sphinx-doc/gists{/gist_id}","starred_url":"https://api.github.com/users/sphinx-doc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphinx-doc/subscriptions","organizations_url":"https://api.github.com/users/sphinx-doc/orgs","repos_url":"https://api.github.com/users/sphinx-doc/repos","events_url":"https://api.github.com/users/sphinx-doc/events{/privacy}","received_events_url":"https://api.github.com/users/sphinx-doc/received_events","type":"Organization","site_admin":false},"repo":{"id":28710753,"name":"sphinx","full_name":"sphinx-doc/sphinx","owner":{"login":"sphinx-doc","id":9928167,"avatar_url":"https://avatars2.githubusercontent.com/u/9928167?v=4","gravatar_id":"","url":"https://api.github.com/users/sphinx-doc","html_url":"https://github.com/sphinx-doc","followers_url":"https://api.github.com/users/sphinx-doc/followers","following_url":"https://api.github.com/users/sphinx-doc/following{/other_user}","gists_url":"https://api.github.com/users/sphinx-doc/gists{/gist_id}","starred_url":"https://api.github.com/users/sphinx-doc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphinx-doc/subscriptions","organizations_url":"https://api.github.com/users/sphinx-doc/orgs","repos_url":"https://api.github.com/users/sphinx-doc/repos","events_url":"https://api.github.com/users/sphinx-doc/events{/privacy}","received_events_url":"https://api.github.com/users/sphinx-doc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphinx-doc/sphinx","description":"Main repository for the Sphinx documentation builder","fork":false,"url":"https://api.github.com/repos/sphinx-doc/sphinx","forks_url":"https://api.github.com/repos/sphinx-doc/sphinx/forks","keys_url":"https://api.github.com/repos/sphinx-doc/sphinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphinx-doc/sphinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphinx-doc/sphinx/teams","hooks_url":"https://api.github.com/repos/sphinx-doc/sphinx/hooks","issue_events_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/events{/number}","events_url":"https://api.github.com/repos/sphinx-doc/sphinx/events","assignees_url":"https://api.github.com/repos/sphinx-doc/sphinx/assignees{/user}","branches_url":"https://api.github.com/repos/sphinx-doc/sphinx/branches{/branch}","tags_url":"https://api.github.com/repos/sphinx-doc/sphinx/tags","blobs_url":"https://api.github.com/repos/sphinx-doc/sphinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphinx-doc/sphinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphinx-doc/sphinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphinx-doc/sphinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphinx-doc/sphinx/statuses/{sha}","languages_url":"https://api.github.com/repos/sphinx-doc/sphinx/languages","stargazers_url":"https://api.github.com/repos/sphinx-doc/sphinx/stargazers","contributors_url":"https://api.github.com/repos/sphinx-doc/sphinx/contributors","subscribers_url":"https://api.github.com/repos/sphinx-doc/sphinx/subscribers","subscription_url":"https://api.github.com/repos/sphinx-doc/sphinx/subscription","commits_url":"https://api.github.com/repos/sphinx-doc/sphinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphinx-doc/sphinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphinx-doc/sphinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphinx-doc/sphinx/contents/{+path}","compare_url":"https://api.github.com/repos/sphinx-doc/sphinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphinx-doc/sphinx/merges","archive_url":"https://api.github.com/repos/sphinx-doc/sphinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphinx-doc/sphinx/downloads","issues_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues{/number}","pulls_url":"https://api.github.com/repos/sphinx-doc/sphinx/pulls{/number}","milestones_url":"https://api.github.com/repos/sphinx-doc/sphinx/milestones{/number}","notifications_url":"https://api.github.com/repos/sphinx-doc/sphinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphinx-doc/sphinx/labels{/name}","releases_url":"https://api.github.com/repos/sphinx-doc/sphinx/releases{/id}","deployments_url":"https://api.github.com/repos/sphinx-doc/sphinx/deployments","created_at":"2015-01-02T10:53:28Z","updated_at":"2018-05-30T06:47:14Z","pushed_at":"2018-05-28T17:14:06Z","git_url":"git://github.com/sphinx-doc/sphinx.git","ssh_url":"git@github.com:sphinx-doc/sphinx.git","clone_url":"https://github.com/sphinx-doc/sphinx.git","svn_url":"https://github.com/sphinx-doc/sphinx","homepage":"http://sphinx-doc.org","size":30062,"stargazers_count":1909,"watchers_count":1909,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":803,"mirror_url":null,"archived":false,"open_issues_count":669,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":803,"open_issues":669,"watchers":1909,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/5012"},"html":{"href":"https://github.com/sphinx-doc/sphinx/pull/5012"},"issue":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/issues/5012"},"comments":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/issues/5012/comments"},"review_comments":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/5012/comments"},"review_comment":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/pulls/5012/commits"},"statuses":{"href":"https://api.github.com/repos/sphinx-doc/sphinx/statuses/94d4fe22af2cd6434e2026702eb6e9d6adbb47e8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jfbu"}}