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

Format tables so the columns are equal widths. #501

Open
rquadling opened this issue Apr 23, 2024 · 0 comments
Open

Format tables so the columns are equal widths. #501

rquadling opened this issue Apr 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@rquadling
Copy link

Describe the Enhancement:

It can be easy to write a markdown table.

| Column 1 | Column 2 |
|:---------|:---------|
| Lot of text that takes up space | Small text |
| Small text | Lot of test that takes up space |

But as you can see above, the columns are not all lined up and so with a mutli-column table, this gets a little harder to read.

Having a way to "fix" the above content so it looks like this:

| Column 1                        | Column 2                        |
|:--------------------------------|:--------------------------------|
| Lot of text that takes up space | Small text                      |
| Small text                      | Lot of test that takes up space |

is a LOT nicer to read!

This is literally my first day looking into markdownlint. I'd like to use it via pre-commit, so committed Markdown files, those generated by/from external sources, as well as manually constructed files, are all formatted nicely for readability without the need for a rendered view.

Impacted Rules:

I think the only rule is MD013 due to long lines being made when a LOT of columns are in play.

Describe the Need:

The point of a Markdown file is to be able to read it AND have it nice formatted when presented via a suitable formatter.

Current Alternative

I am unaware even if this is already a capability. I assume all rules are enabled by default. Using --disable MD013 MD033 shows nothing untowards with the Markdown files I have locally.

Can We Help You Implement This?:

Algorithmically, the work should be achievable. I don't know anything about Ruby, but it's just another language that I'm not needing to learn from scratch if there are people to help.

@rquadling rquadling added the enhancement New feature or request label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant