Where a SPACE follows the last \ (if the space is not present then the error does not exhibit)
Python example:
from gherkin.parser import Parser
from gherkin.token_scanner import TokenScanner
feature_text = """
Feature: As a developer I want to report a bug
Scenario: Bad table escape
When I have a table
| Name | Value |
| A | \ """
# ^- Note space
parser = Parser()
parser.parse(TokenScanner(feature_text))
Will fail the parser because of StopIteration.
β What did you expect to see?
A CompositeParserException raised with position of error - which is what is seen if the space is removed
π¦ Which tool/library version are you using?
python gherkin_official-4.1.3 but I believe exists in current github code also related to split_table_cells in gherkin_line.py
π¬ How could we reproduce it?
Steps to reproduce the behavior:
Install gherkin-official.' version 'gherkin_official-4.1.3'
Create a file called 'gherkin_test.py' with the contents above
python gherkin_test.py
See error 'RuntimeError: generator raised StopIteration'
π What did you see?
A table of the form
Where a SPACE follows the last \ (if the space is not present then the error does not exhibit)
Python example:
Will fail the parser because of StopIteration.
β What did you expect to see?
A CompositeParserException raised with position of error - which is what is seen if the space is removed
π¦ Which tool/library version are you using?
python gherkin_official-4.1.3 but I believe exists in current github code also related to split_table_cells in gherkin_line.py
π¬ How could we reproduce it?
Steps to reproduce the behavior: