{"action":"created","issue":{"url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/issues/27","labels_url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/issues/27/comments","events_url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/issues/27/events","html_url":"https://github.com/asciidoctor/asciidoctor-pdf/issues/27","id":40435280,"number":27,"title":"Exception if asciidoc contains table of contents","user":{"login":"may-bee","id":1427255,"avatar_url":"https://avatars.githubusercontent.com/u/1427255?v=3","gravatar_id":"","url":"https://api.github.com/users/may-bee","html_url":"https://github.com/may-bee","followers_url":"https://api.github.com/users/may-bee/followers","following_url":"https://api.github.com/users/may-bee/following{/other_user}","gists_url":"https://api.github.com/users/may-bee/gists{/gist_id}","starred_url":"https://api.github.com/users/may-bee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/may-bee/subscriptions","organizations_url":"https://api.github.com/users/may-bee/orgs","repos_url":"https://api.github.com/users/may-bee/repos","events_url":"https://api.github.com/users/may-bee/events{/privacy}","received_events_url":"https://api.github.com/users/may-bee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"mojavelinux","id":79351,"avatar_url":"https://avatars.githubusercontent.com/u/79351?v=3","gravatar_id":"","url":"https://api.github.com/users/mojavelinux","html_url":"https://github.com/mojavelinux","followers_url":"https://api.github.com/users/mojavelinux/followers","following_url":"https://api.github.com/users/mojavelinux/following{/other_user}","gists_url":"https://api.github.com/users/mojavelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/mojavelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojavelinux/subscriptions","organizations_url":"https://api.github.com/users/mojavelinux/orgs","repos_url":"https://api.github.com/users/mojavelinux/repos","events_url":"https://api.github.com/users/mojavelinux/events{/privacy}","received_events_url":"https://api.github.com/users/mojavelinux/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/milestones/2","html_url":"https://github.com/asciidoctor/asciidoctor-pdf/milestones/v1.5.0","labels_url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/milestones/2/labels","id":756849,"number":2,"title":"v1.5.0","description":"The first stable release of the converter, aligns with Asciidoctor 1.5.0. ","creator":{"login":"mojavelinux","id":79351,"avatar_url":"https://avatars.githubusercontent.com/u/79351?v=3","gravatar_id":"","url":"https://api.github.com/users/mojavelinux","html_url":"https://github.com/mojavelinux","followers_url":"https://api.github.com/users/mojavelinux/followers","following_url":"https://api.github.com/users/mojavelinux/following{/other_user}","gists_url":"https://api.github.com/users/mojavelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/mojavelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojavelinux/subscriptions","organizations_url":"https://api.github.com/users/mojavelinux/orgs","repos_url":"https://api.github.com/users/mojavelinux/repos","events_url":"https://api.github.com/users/mojavelinux/events{/privacy}","received_events_url":"https://api.github.com/users/mojavelinux/received_events","type":"User","site_admin":false},"open_issues":32,"closed_issues":76,"state":"open","created_at":"2014-08-18T05:02:11Z","updated_at":"2015-06-22T23:32:07Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2014-08-17T14:32:03Z","updated_at":"2015-06-22T23:33:28Z","closed_at":"2015-06-22T23:32:03Z","body":"Hi,\r\n\r\nif a asciidoc file contains a table of contents like\r\n```\r\n:toc:\r\ntoc::[]\r\n```\r\ngeneration ends with the following exception:\r\n```\r\n/.../asciidoctor-pdf/lib/asciidoctor/pdf_renderer.rb:1100:in `render_toc_node': undefined method `each' for nil:NilClass (NoMethodError)\r\n\tfrom /.../asciidoctor-pdf/lib/asciidoctor/pdf_renderer.rb:81:in `render_node'\r\n\tfrom /.../asciidoctor-pdf/lib/asciidoctor/pdf_renderer.rb:89:in `block in render_children'\r\n\tfrom /.../asciidoctor-pdf/lib/asciidoctor/pdf_renderer.rb:89:in `each'\r\n\tfrom /.../asciidoctor-pdf/lib/asciidoctor/pdf_renderer.rb:89:in `render_children'\r\n\tfrom /.../asciidoctor-pdf/lib/asciidoctor/pdf_renderer.rb:167:in `render_document_node'\r\n\tfrom /.../asciidoctor-pdf/lib/asciidoctor/pdf_renderer.rb:52:in `block in render'\r\n\tfrom /var/lib/gems/1.9.1/gems/prawn-1.0.0/lib/prawn/document.rb:228:in `instance_eval'\r\n\tfrom /var/lib/gems/1.9.1/gems/prawn-1.0.0/lib/prawn/document.rb:228:in `initialize'\r\n\tfrom /var/lib/gems/1.9.1/gems/prawn-1.0.0/lib/prawn/document.rb:144:in `new'\r\n\tfrom /var/lib/gems/1.9.1/gems/prawn-1.0.0/lib/prawn/document.rb:144:in `generate'\r\n\tfrom /.../asciidoctor-pdf/lib/asciidoctor/pdf_renderer.rb:46:in `render'\r\n\tfrom ../asciidoctor-pdf/bin/asciidoctor-pdf:68:in `<main>'\r\n```"},"comment":{"url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/issues/comments/114302279","html_url":"https://github.com/asciidoctor/asciidoctor-pdf/issues/27#issuecomment-114302279","issue_url":"https://api.github.com/repos/asciidoctor/asciidoctor-pdf/issues/27","id":114302279,"user":{"login":"mojavelinux","id":79351,"avatar_url":"https://avatars.githubusercontent.com/u/79351?v=3","gravatar_id":"","url":"https://api.github.com/users/mojavelinux","html_url":"https://github.com/mojavelinux","followers_url":"https://api.github.com/users/mojavelinux/followers","following_url":"https://api.github.com/users/mojavelinux/following{/other_user}","gists_url":"https://api.github.com/users/mojavelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/mojavelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojavelinux/subscriptions","organizations_url":"https://api.github.com/users/mojavelinux/orgs","repos_url":"https://api.github.com/users/mojavelinux/repos","events_url":"https://api.github.com/users/mojavelinux/events{/privacy}","received_events_url":"https://api.github.com/users/mojavelinux/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T23:33:28Z","updated_at":"2015-06-22T23:33:28Z","body":"Note that we still need to implement manual placement for the toc. But for now, at least the processor doesn't crash if a toc macro is used. Instead, it inserts the toc in the predetermined location."}}