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

Leading and trailing space when formatting without pipes #7

Open
droberts-sea opened this issue Jan 30, 2019 · 1 comment
Open

Leading and trailing space when formatting without pipes #7

droberts-sea opened this issue Jan 30, 2019 · 1 comment

Comments

@droberts-sea
Copy link

droberts-sea commented Jan 30, 2019

When formatting with the "Keep First And Last Pipes" option disabled, one space character is inserted before each line, and spaces are included at the end of each line up to the padding limit. IMO it would look better without (particularly the leading space).

Here's a copy-paste. It's much more pronounced if you see it in an editor that displays whitespace.

 Attribute  | Description                                      | Rules                                                                                           
------------|--------------------------------------------------|-------------------------------------------------------------------------------------------------
 vehicle_id | The driver's Vehicle Identification Number (VIN) | String of length 17. Raise an `ArgumentError` if it's the wrong length.                         
 status     | Is this `Driver` available to drive?             | Must be one of `:AVAILABLE` or `:UNAVAILABLE`                                                 
 trips      | A list of trips this driver has driven           | Optional parameter. If not provided, initialize to an empty array (similar to `Passenger`).
@fcrespo82
Copy link
Owner

Hi @droberts-ada, thanks for the feedback.

Currently this feature is controlled by the config option Space Padding which says "How many spaces between left and right of each column content". It doesn't care whether it is the beginning of the line or the end.

This could be an additional option or could be implied when Keep First And Last Pipes is set.

I'll take a look at this sometime this week. But, if you like, you can give it a shot on this change and open a PR.

Much appreciated.

@fcrespo82 fcrespo82 self-assigned this Oct 21, 2019
@fcrespo82 fcrespo82 added this to the v2.2.0 milestone Jul 16, 2020
@fcrespo82 fcrespo82 removed this from the v2.2.0 milestone Jun 22, 2023
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