{"action":"created","issue":{"url":"https://api.github.com/repos/slang800/atom-tidy-markdown/issues/5","labels_url":"https://api.github.com/repos/slang800/atom-tidy-markdown/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/slang800/atom-tidy-markdown/issues/5/comments","events_url":"https://api.github.com/repos/slang800/atom-tidy-markdown/issues/5/events","html_url":"https://github.com/slang800/atom-tidy-markdown/issues/5","id":63648616,"number":5,"title":"Uncaught TypeError: Cannot read property 'type' of undefined","user":{"login":"tmarrs","id":204931,"avatar_url":"https://avatars.githubusercontent.com/u/204931?v=3","gravatar_id":"","url":"https://api.github.com/users/tmarrs","html_url":"https://github.com/tmarrs","followers_url":"https://api.github.com/users/tmarrs/followers","following_url":"https://api.github.com/users/tmarrs/following{/other_user}","gists_url":"https://api.github.com/users/tmarrs/gists{/gist_id}","starred_url":"https://api.github.com/users/tmarrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmarrs/subscriptions","organizations_url":"https://api.github.com/users/tmarrs/orgs","repos_url":"https://api.github.com/users/tmarrs/repos","events_url":"https://api.github.com/users/tmarrs/events{/privacy}","received_events_url":"https://api.github.com/users/tmarrs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-23T07:25:13Z","updated_at":"2015-03-26T17:56:32Z","closed_at":null,"body":"[Enter steps to reproduce below:]\r\n\r\n1. ...\r\n2. ...\r\n\r\n**Atom Version**: 0.187.0\r\n**System**: Mac OS X 10.10.2\r\n**Thrown From**: [tidy-markdown](https://github.com/slang800/atom-tidy-markdown) package, v0.1.1\r\n\r\n### Stack Trace\r\n\r\nUncaught TypeError: Cannot read property 'type' of undefined\r\n\r\n```\r\nAt /Applications/Atom.app/Contents/Resources/app/src/pane.js:784\r\n\r\nTypeError: Cannot read property 'type' of undefined\r\n  at preprocessAST (/Users/tmarrs/.atom/packages/tidy-markdown/node_modules/tidy-markdown/lib/index.coffee:102:18)\r\n  at preprocessAST (/Users/tmarrs/.atom/packages/tidy-markdown/node_modules/tidy-markdown/lib/index.coffee:114:7)\r\n  at module.exports (/Users/tmarrs/.atom/packages/tidy-markdown/node_modules/tidy-markdown/lib/index.coffee:221:9)\r\n  at TidyMarkdown.run (/Users/tmarrs/.atom/packages/tidy-markdown/lib/tidy-markdown.coffee:36:17)\r\n  at /Users/tmarrs/.atom/packages/tidy-markdown/lib/tidy-markdown.coffee:23:12\r\n  at History.module.exports.History.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:115:18)\r\n  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:687:27)\r\n  at /Users/tmarrs/.atom/packages/tidy-markdown/lib/tidy-markdown.coffee:21:14\r\n  at TextBuffer.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:118:15)\r\n  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:968:12)\r\n  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:958:19)\r\n  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:621:26)\r\n  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:542:18)\r\n  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:525:19)\r\n  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:689:35)\r\n  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:295:30)\r\n  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:246:29)\r\n  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61\r\n  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)\r\n  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)\r\n  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:182:20)\r\n\r\n```\r\n\r\n### Commands\r\n\r\n```\r\n 12x -9:41.6 core:undo (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)\r\n     -9:17.9 core:save (atom-text-editor.editor)\r\n     -8:52.7 markdown-preview:toggle (atom-text-editor.editor)\r\n  7x -8:15.6 core:save (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)\r\n     -5:51.2 core:confirm (atom-text-editor.editor.mini)\r\n     -1:38.3 core:copy (atom-text-editor.editor.is-focused)\r\n     -1:35.3 core:paste (atom-text-editor.editor.is-focused)\r\n     -1:26.9 core:backspace (atom-text-editor.editor.is-focused)\r\n     -1:09.4 core:move-left (atom-text-editor.editor.is-focused)\r\n     -1:08.3 core:paste (atom-text-editor.editor.is-focused)\r\n  6x -1:07.1 core:backspace (atom-text-editor.editor.is-focused)\r\n  2x -0:51.8 core:paste (atom-text-editor.editor.is-focused)\r\n     -0:02.6 core:save (atom-text-editor.editor.is-focused)\r\n```\r\n\r\n### Config\r\n\r\n```json\r\n{\r\n  \"core\": {\r\n    \"disabledPackages\": [\r\n      \"language-ruby-on-rails\",\r\n      \"minimap\",\r\n      \"wrap-guide\"\r\n    ],\r\n    \"themes\": [\r\n      \"atom-dark-ui\",\r\n      \"monokai\"\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n### Installed Packages\r\n\r\n```coffee\r\n# User\r\nangularjs, v0.2.0\r\nangularjs-styleguide-snippets, v0.5.0\r\nasciidoc-preview, v0.4.3\r\natom-beautify, v0.23.0\r\natom-lint, v0.20.1\r\natom-runner, v2.3.0\r\nautoclose-html, v0.15.0\r\nautocomplete-html, v0.5.0\r\ncoffee-lint, v0.7.3\r\ncolor-picker, v1.5.0\r\nesformatter, v1.4.0\r\neslint, v0.15.0\r\ngit-projects, v1.11.0\r\njs-refactor, v0.3.0\r\njsformat, v0.7.18\r\njsonlint, v1.0.2\r\nlanguage-asciidoc, v0.11.1\r\nlanguage-javascript-semantic, v0.1.0\r\nlinter, v0.12.0\r\nlinter-csslint, v0.0.11\r\nlinter-eslint, v0.5.0\r\nlinter-htmlhint, v0.0.8\r\nlinter-javac, v0.1.3\r\nlinter-rubocop, v0.2.2\r\nlinter-tidy, v1.0.0\r\nmarkdown-format, v2.5.0\r\nmarkdown-table-formatter, v2.5.2\r\nmocha, v0.0.5\r\nmonokai, v0.12.0\r\nopen-last-project, v0.3.5\r\npretty-json, v0.3.2\r\nproject-manager, v1.15.5\r\nrefactor, v0.4.1\r\nregex-railroad-diagram, v0.7.1\r\nruby-block, v0.3.3\r\nruby-block-converter, v3.3.0\r\nscript, v2.18.0\r\nslash-closer, v0.7.1\r\ntidy-markdown, v0.1.1\r\n\r\n# Dev\r\nNo dev packages\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/slang800/atom-tidy-markdown/issues/comments/86646294","html_url":"https://github.com/slang800/atom-tidy-markdown/issues/5#issuecomment-86646294","issue_url":"https://api.github.com/repos/slang800/atom-tidy-markdown/issues/5","id":86646294,"user":{"login":"yantongl","id":573250,"avatar_url":"https://avatars.githubusercontent.com/u/573250?v=3","gravatar_id":"","url":"https://api.github.com/users/yantongl","html_url":"https://github.com/yantongl","followers_url":"https://api.github.com/users/yantongl/followers","following_url":"https://api.github.com/users/yantongl/following{/other_user}","gists_url":"https://api.github.com/users/yantongl/gists{/gist_id}","starred_url":"https://api.github.com/users/yantongl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yantongl/subscriptions","organizations_url":"https://api.github.com/users/yantongl/orgs","repos_url":"https://api.github.com/users/yantongl/repos","events_url":"https://api.github.com/users/yantongl/events{/privacy}","received_events_url":"https://api.github.com/users/yantongl/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T17:56:32Z","updated_at":"2015-03-26T17:56:32Z","body":"In addition, when this happens, the file failed to save. I have to disable tidy-markdown so I can save my change. Could we make sure files will always be saved, even tidy-markdown failed to fix the file?\r\n"}}