ducminh-phan / reformat-gherkin

Formatter for Gherkin language
MIT License
22 stars 13 forks source link

comments within a table leads to "generator raised StopIteration" #67

Open amkurz opened 1 year ago

amkurz commented 1 year ago

Describe the bug

When reformatting files with table rows commented out, the parser stops with an StopIteration error.

To Reproduce


Feature: table_bug

Scenario: 1 StopIteration error after "And I set fields"
Given I open an editor "Zeitbuchung" for tip command "Zeitbuchung" and arguments ""
And I set field "barmex" to "nummer" from editor "RM1_FallR2"
And I set fields
# | barmex    | !Rückmeldung2^nummer|
    | lgr       | 1                   |
    | bzeit     | -3                  |
And I save the current editor

Actual behaviour

No formatting is done. Error: cannot format tablebug.feature: generator raised StopIteration

Environment

Additional context

The error happens in every table, independent whether it start with "And I set fields", "And I modify table" or "Then table has values".