jlevy / atom-flowmark

Markdown auto-formatting, beautification, and cleanup for Atom
Apache License 2.0
43 stars 7 forks source link

Don't pad tables #36

Closed jlevy closed 4 years ago

jlevy commented 4 years ago

Or, maybe better, don't pad them if they exceed 100 chars wide.

Really big tables are almost impossible to edit when padded.

wooorm commented 4 years ago

You can turn paddedTable off, to never add superfluous spaces.

jlevy commented 4 years ago

@wooorm best behavior would be to remove padding if any line is over 100 chars wide. But am assuming that's a bit more work?

wooorm commented 4 years ago

That is harder because you need to calculate how many columns something would serialize at, and if that’s too much, serialize it differently (which could again serialize it shorter than the limit). So indeed, that’s not very simple

jlevy commented 4 years ago

Seems like it needn't be perfect, just deterministic, e.g. count max raw text chars on any line of the table, then use that, which would reduce the circularity problem.

But OK sticking with simple approach for now, included in latest patch release.