{"action":"created","issue":{"url":"https://api.github.com/repos/k0kubun/md2key/issues/17","labels_url":"https://api.github.com/repos/k0kubun/md2key/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/k0kubun/md2key/issues/17/comments","events_url":"https://api.github.com/repos/k0kubun/md2key/issues/17/events","html_url":"https://github.com/k0kubun/md2key/pull/17","id":102943470,"number":17,"title":"set default file extension for <pre> syntax without specifying filetype","user":{"login":"ainoya","id":2300438,"avatar_url":"https://avatars.githubusercontent.com/u/2300438?v=3","gravatar_id":"","url":"https://api.github.com/users/ainoya","html_url":"https://github.com/ainoya","followers_url":"https://api.github.com/users/ainoya/followers","following_url":"https://api.github.com/users/ainoya/following{/other_user}","gists_url":"https://api.github.com/users/ainoya/gists{/gist_id}","starred_url":"https://api.github.com/users/ainoya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ainoya/subscriptions","organizations_url":"https://api.github.com/users/ainoya/orgs","repos_url":"https://api.github.com/users/ainoya/repos","events_url":"https://api.github.com/users/ainoya/events{/privacy}","received_events_url":"https://api.github.com/users/ainoya/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-25T03:50:11Z","updated_at":"2015-08-25T04:15:52Z","closed_at":"2015-08-25T04:15:05Z","pull_request":{"url":"https://api.github.com/repos/k0kubun/md2key/pulls/17","html_url":"https://github.com/k0kubun/md2key/pull/17","diff_url":"https://github.com/k0kubun/md2key/pull/17.diff","patch_url":"https://github.com/k0kubun/md2key/pull/17.patch"},"body":"If I use `<pre>` syntax without filetype specifier, it raises `NoMethodError`.\r\n\r\nFor example,\r\n\r\n<pre>\r\n$ cat exception_pre.md\r\n\r\n## some title\r\n\r\nBAD\r\n\r\n```\r\nHere is\r\ninside\r\npre syntax\r\n```\r\n\r\nOK\r\n\r\n```rb\r\nputs \"this goes good\"\r\n```\r\n\r\n$md2key exception_pre.md\r\n/usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/markdown.rb:62:in `block (2 levels) in generate_slides': undefined method `value' for nil:NilClass (NoMethodError)\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/oga-1.2.3/lib/oga/xml/node_set.rb:62:in `block in each'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/oga-1.2.3/lib/oga/xml/node_set.rb:62:in `each'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/oga-1.2.3/lib/oga/xml/node_set.rb:62:in `each'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/markdown.rb:60:in `block in generate_slides'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/oga-1.2.3/lib/oga/xml/node_set.rb:62:in `block in each'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/oga-1.2.3/lib/oga/xml/node_set.rb:62:in `each'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/oga-1.2.3/lib/oga/xml/node_set.rb:62:in `each'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/markdown.rb:33:in `generate_slides'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/markdown.rb:26:in `cached_slides'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/markdown.rb:16:in `cover'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/converter.rb:28:in `generate_contents'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/converter.rb:15:in `generate_keynote!'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/converter.rb:6:in `convert_markdown'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/cli.rb:7:in `convert'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/cli.rb:19:in `default_task'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/lib/md2key/cli.rb:15:in `method_missing'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'\r\n        from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/md2key-0.4.3/bin/md2key:6:in `<top (required)>'\r\n        from /usr/local/var/rbenv/versions/2.1.5/bin/md2key:23:in `load'\r\n        from /usr/local/var/rbenv/versions/2.1.5/bin/md2key:23:in `<main>'\r\n\r\n</pre>\r\n\r\nFor prevent this error, I'd like to set default filetype `.txt` which is used if there are `<pre>` syntax without specifying filetype. \r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/k0kubun/md2key/issues/comments/134469411","html_url":"https://github.com/k0kubun/md2key/pull/17#issuecomment-134469411","issue_url":"https://api.github.com/repos/k0kubun/md2key/issues/17","id":134469411,"user":{"login":"k0kubun","id":3138447,"avatar_url":"https://avatars.githubusercontent.com/u/3138447?v=3","gravatar_id":"","url":"https://api.github.com/users/k0kubun","html_url":"https://github.com/k0kubun","followers_url":"https://api.github.com/users/k0kubun/followers","following_url":"https://api.github.com/users/k0kubun/following{/other_user}","gists_url":"https://api.github.com/users/k0kubun/gists{/gist_id}","starred_url":"https://api.github.com/users/k0kubun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k0kubun/subscriptions","organizations_url":"https://api.github.com/users/k0kubun/orgs","repos_url":"https://api.github.com/users/k0kubun/repos","events_url":"https://api.github.com/users/k0kubun/events{/privacy}","received_events_url":"https://api.github.com/users/k0kubun/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T04:15:52Z","updated_at":"2015-08-25T04:15:52Z","body":"Released as v0.4.4 :gem: "}}