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 option to remove padding spaces in delimiter row #66

Open
alonso-herreros opened this issue Mar 6, 2024 · 4 comments · May be fixed by #73
Open

Add option to remove padding spaces in delimiter row #66

alonso-herreros opened this issue Mar 6, 2024 · 4 comments · May be fixed by #73

Comments

@alonso-herreros
Copy link

I'd like an option to not insert spaces between the -s and the |s in the second line of my tables. First, I am working in a project where tables are formatted this way, and whenever I navigate tables i have to go back and revert this line's changes. Second, font ligatures make the |---| style nicer than | --- |

@alonso-herreros
Copy link
Author

I think these are the lines where those spaces are added by force

tableData.alignTexts[i] = ' ' + front;

tableData.alignTexts[i] += end + ' ';

@takumisoft68
Copy link
Owner

@alonso-herreros
Thank you for using this extension.

This extension respects the Github Flavored Markdown Spec.
In that spec, sample tables have spaces in delimiter row.

https://github.github.com/gfm/#tables-extension-

@dougwaldron
Copy link

@takumisoft68 First, thanks for this great extension! I use it all the time.

I hope you can reconsider this issue. It's true that the sample tables in the spec use spaces in the delimiter row, but that doesn't mean they're required. The spec allows many variations (such as leading/trailing pipes, inconsistent column length, etc.) and so these should be considered matters of personal style. GitHub itself recognizes tables with or without the extra spaces in the delimiter row.

Implementing this would help a lot since other extensions (for other IDEs we use) format tables without the extra spaces.

@jimtng
Copy link

jimtng commented Jan 1, 2025

It would be great to have this option. It can default to off to keep the current behaviour by default

@jimtng jimtng linked a pull request Jan 1, 2025 that will close this issue
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 a pull request may close this issue.

4 participants