klorenz / atom-table-editor

Easily edit and navigate markdown tables
MIT License
13 stars 3 forks source link

Newlines after Table are removed #7

Open ERFier opened 7 years ago

ERFier commented 7 years ago

The formater accidentially removes newlines at the end of the table which causes the demo tables to fusion together and triggers issue #6 .

The problem is caused by the toString method that converts the tables array but dont append a newline at the end. While the newly formated table misses the newline at the end the old one was read with it and is replaced.

I think the problem is the same for all tableprocessors and thus a posible fix would be to add @newTableText = @newTableText + @newLine right befor the return statement of getFormattedTableText.