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

Add support for variable last column widths in Markdown tables #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eread
Copy link

@eread eread commented Sep 8, 2023

Add support for variable last column widths in Markdown tables.

Often the last column in a Markdown table is the widest, and adding new rows with long pieces of text can cause the whole table to need reformatting, which isn't ideal in a Git diff view.

If the last column in a Markdown table can be variable width, the example given in #22 is a single-line change, rather than a seven-line change.

Closes: #22.

@eread
Copy link
Author

eread commented Sep 8, 2023

@bitwiser73 What do you think of this PR? I'm using the changes locally and they work great for me.

I think the code could be optimized so that rather than making the change after the initial column widths are calculated, the final column setting is just set up front and there's no attempt at calculating it dynamically.

That said, it's probably not a very costly operation either way.

@eread
Copy link
Author

eread commented Oct 28, 2024

@bitwiser73 What do you think of this PR? I'm using the changes locally and they work great for me.

I think the code could be optimized so that rather than making the change after the initial column widths are calculated, the final column setting is just set up front and there's no attempt at calculating it dynamically.

That said, it's probably not a very costly operation either way.

@bitwiser73 I thought I might follow up on this and see if you're interested in merging it?

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

Successfully merging this pull request may close these issues.

Adjustable final column width setting
1 participant