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

Memory of column widths fails when there are inline comments #128

Closed
xyu opened this issue Mar 25, 2024 · 3 comments · Fixed by #130
Closed

Memory of column widths fails when there are inline comments #128

xyu opened this issue Mar 25, 2024 · 3 comments · Fixed by #130

Comments

@xyu
Copy link

xyu commented Mar 25, 2024

When there are either blank lines or comments between rows of a table, for example a feature file that looks something like this:

Feature: Test Formatter
  Scenario: Comment between rows
    Given table my_table
      | col a | col b |
      | 1     | 2     |
      # A comment about the row below
      | 3     | 4     |

On the latest 3.5.0 (as well as earlier) version of ghokin the 3rd row of the table gets formatted as if the column width should be sized interdependently of the rest of the table.

$ ghokin fmt stdout test.feature

Produces:

Feature: Test Formatter
  Scenario: Comment between rows
    Given table my_table
      | col a | col b |
      | 1     | 2     |
      # A comment about the row below
      | 3 | 4 |
@antham
Copy link
Owner

antham commented Mar 25, 2024

Hi,
thanks for reporting, it's going to be a bit hard to fix I think.

@antham
Copy link
Owner

antham commented Mar 25, 2024

@xyu
Copy link
Author

xyu commented Mar 25, 2024

Thanks!

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.

2 participants