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

Compiling fails if last character is backslash at example table cell #1954

Closed
elchupanebrej opened this issue Apr 14, 2022 · 2 comments Β· Fixed by #2048
Closed

Compiling fails if last character is backslash at example table cell #1954

elchupanebrej opened this issue Apr 14, 2022 · 2 comments Β· Fixed by #2048

Comments

@elchupanebrej
Copy link

elchupanebrej commented Apr 14, 2022

πŸ‘“ What did you see? - Parsing fails if last character is "\" at example table cell

βœ… What did you expect to see? - Parser parse such table without errors

πŸ“¦ Which tool/library version are you using? - https://pypi.org/project/gherkin-official/23.0.1/

πŸ”¬ How could we reproduce it?

from gherkin.parser import Parser
from gherkin.pickles.compiler import Compiler

feature = r"""
Feature: Outline backslash character

    Scenario Outline: Outline with escaped backslash character
        Given I print the <string>

        Examples:
        | string |
        | bork\\ |

"""

gherkin_ast_data = Parser().parse(feature)
pickles = Compiler().compile(gherkin_ast_data)

πŸ“š Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@elchupanebrej elchupanebrej changed the title Last cahracter backslash at example table cell parsing fails Parsing fails if last character is backslash at example table cell Apr 14, 2022
@aurelien-reeves
Copy link
Contributor

Thanks again @elchupanebrej 😁

Same as cucumber/gherkin#28 : I'll check if this happens with other implementations

@brasmusson
Copy link
Contributor

To be precis, it is not parsing but compiling which fails with trailing backslash.

@brasmusson brasmusson changed the title Parsing fails if last character is backslash at example table cell Compiling fails if last character is backslash at example table cell Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants