{"action":"created","issue":{"url":"https://api.github.com/repos/djm/table_rex/issues/13","repository_url":"https://api.github.com/repos/djm/table_rex","labels_url":"https://api.github.com/repos/djm/table_rex/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/djm/table_rex/issues/13/comments","events_url":"https://api.github.com/repos/djm/table_rex/issues/13/events","html_url":"https://github.com/djm/table_rex/issues/13","id":187430786,"number":13,"title":"Breaking when the header is longer than the table is wide","user":{"login":"boxxxie","id":440034,"avatar_url":"https://avatars.githubusercontent.com/u/440034?v=3","gravatar_id":"","url":"https://api.github.com/users/boxxxie","html_url":"https://github.com/boxxxie","followers_url":"https://api.github.com/users/boxxxie/followers","following_url":"https://api.github.com/users/boxxxie/following{/other_user}","gists_url":"https://api.github.com/users/boxxxie/gists{/gist_id}","starred_url":"https://api.github.com/users/boxxxie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxxxie/subscriptions","organizations_url":"https://api.github.com/users/boxxxie/orgs","repos_url":"https://api.github.com/users/boxxxie/repos","events_url":"https://api.github.com/users/boxxxie/events{/privacy}","received_events_url":"https://api.github.com/users/boxxxie/received_events","type":"User","site_admin":false},"labels":[{"id":304740385,"url":"https://api.github.com/repos/djm/table_rex/labels/Kind:Bug","name":"Kind:Bug","color":"e11d21","default":false},{"id":477540618,"url":"https://api.github.com/repos/djm/table_rex/labels/Status:AvailableForPickUp","name":"Status:AvailableForPickUp","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-04T20:28:21Z","updated_at":"2016-12-21T16:45:31Z","closed_at":null,"body":"this code throws an error\r\n```\r\n    TableRex.quick_render!([[300],[300]], [\"passed\", \"failed\"], \"Test Results for Normal Couple\")  \r\n** (FunctionClauseError) no function clause matching in String.duplicate/2\r\n    (elixir) lib/string.ex:1111: String.duplicate(\" \", -6)\r\n             lib/table_rex/renderer/text.ex:217: TableRex.Renderer.Text.do_render_cell/4\r\n             lib/table_rex/renderer/text.ex:99: TableRex.Renderer.Text.render_title/1\r\n             lib/table_rex/renderer/text.ex:67: TableRex.Renderer.Text.render/2\r\n             lib/table_rex.ex:26: TableRex.quick_render!/3\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/djm/table_rex/issues/comments/268571618","html_url":"https://github.com/djm/table_rex/issues/13#issuecomment-268571618","issue_url":"https://api.github.com/repos/djm/table_rex/issues/13","id":268571618,"user":{"login":"djm","id":88744,"avatar_url":"https://avatars.githubusercontent.com/u/88744?v=3","gravatar_id":"","url":"https://api.github.com/users/djm","html_url":"https://github.com/djm","followers_url":"https://api.github.com/users/djm/followers","following_url":"https://api.github.com/users/djm/following{/other_user}","gists_url":"https://api.github.com/users/djm/gists{/gist_id}","starred_url":"https://api.github.com/users/djm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djm/subscriptions","organizations_url":"https://api.github.com/users/djm/orgs","repos_url":"https://api.github.com/users/djm/repos","events_url":"https://api.github.com/users/djm/events{/privacy}","received_events_url":"https://api.github.com/users/djm/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T16:45:31Z","updated_at":"2016-12-21T16:45:31Z","body":"It does sound good! But having 'a legend' does also sound out of scope for what I originally intended to be a very lightweight library to display simple tables. You're welcome to share your answer in a gist though.\r\n\r\nFor clarity in this ticket, the solution we're going with for whoever picks this up will be to include the title in the table width calculations. If it is longer than that of the width, then the cells will be padded out _equally_ until the title fits. As the columns are padded equally, it may mean that the total width then exceeds that of the original long title - but this is a better solution that unequally padding the columns."}}
{"actor":{"display_login":"djm"}}