Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with large padded tables #32

Open
jlevy opened this issue Oct 10, 2016 · 2 comments
Open

Problems with large padded tables #32

jlevy opened this issue Oct 10, 2016 · 2 comments

Comments

@jlevy
Copy link
Contributor

jlevy commented Oct 10, 2016

This is another issue that may be more of a topic for discussion than a bug. It involves some unanticipated consequences to how tables are formatted.

When large tables are made, the large padded tables are ungainly for two reasons:

  • A single large cell (for example, a cell with a link or two in it) spreads the table so wide the padding is useless
  • A single-line change can have non-local changes on every other line

The second issue is the worst, since it effectively means two simultaneous changes to any table will always conflict in GitHub (even if it's to different rows).

In general, to avoid merge conflicts, it'd be great if markdownfmt has only "local" changes, i.e. changes to one line don't affect many other lines in the doc.

Suggested fix: No longer pad table cells with whitespace. Alternately never pad tables if the width will be more than a fixed size, like 80 or 120 chars.

@dmitshur
Copy link
Member

Your observations make sense. There's probably some room for improvement. The current algorithm is very simple and consistent. It'll take some thinking to come up with something better.

@jlevy
Copy link
Contributor Author

jlevy commented Oct 13, 2016

If you'd like a living example of this challenge, take a look at https://github.com/open-guides/og-aws

Now #31 is fixed, this is the remaining near-blocking issue to us using this by default.

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants