fcrespo82 / atom-markdown-table-formatter

A simple markdown plugin to format tables.
MIT License
21 stars 7 forks source link

Coffeescript error while attempting to format #14

Closed sengopal closed 9 years ago

sengopal commented 9 years ago

While attempting to format this table, the package fails to format and throws this error instead. OS: Win 7 Atom: 0.179.0

On document save it formatted correctly. Only the selection and Format failed

Query Query Hint Count
Long Tokens INSERTPK 11526379
Short tokens INSERTPK 3250669
Uncaught TypeError: undefined is not a function
/C:/Users/sengopal/.atom/packages/markdown-table-formatter/lib/markdown-table-formatter.coffee:33
Hide Stack Trace
TypeError: undefined is not a function
  at atom-text-editor.<anonymous> (C:\Users\sengopal\.atom\packages\markdown-table-formatter\lib\markdown-table-formatter.coffee:26:49)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\sengopal\AppData\Local\atom\app-0.179.0\resources\app\src\command-registry.js:243:29)
  at CommandRegistry.handleCommandEvent (C:\Users\sengopal\AppData\Local\atom\app-0.179.0\resources\app\src\command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\sengopal\AppData\Local\atom\app-0.179.0\resources\app\src\command-registry.js:156:19)
  at EventEmitter.<anonymous> (C:\Users\sengopal\AppData\Local\atom\app-0.179.0\resources\app\src\window-event-handler.js:65:30)
  at EventEmitter.emit (events.js:116:17)
The error was thrown from the markdown-table-formatter package. You can help by creating an issue. Please explain what actions triggered this error.
lierdakil commented 9 years ago

Couldn't reproduce. Would you please show a minimal example with all steps required to reproduce spelled out? At first glance it seems that text editor disappears after event is triggered (which would likely be a weird once-in-a-million situation or a bug in Atom)

sengopal commented 9 years ago

i agree. This table was part of a big document, which i cannot share :) due to obvious reasons. Let me check if i can reproduce, so will close for now. Thanks for the plugin, this is a life saver :+1: