Skip to content

Conversation

@stof
Copy link
Member

@stof stof commented Nov 5, 2025

The legacy mode of the gherkin parser was trimming the @ sign from tags when building the AST, so the pretty printer was prepending it back.
As the upstream cucumber gherkin AST preserve the @ sign in tags, future versions of the behat/gherkin parser will preserve it as well.

Refs Behat/Gherkin#336
Refs #1645

The pretty printer can handle that case by detecting the format of the tag, without any need of knowing the compatibility mode used by the parser.
Note that the filtering by tags is not updated in this PR because the implementation of the filter is done in behat/gherkin, not in this repo.

The legacy mode of the gherkin parser was trimming the `@` sign from
tags when building the AST, so the pretty printer was prepending it
back.
As the upstream cucumber gherkin AST preserve the `@` sign in tags,
future versions of the behat/gherkin parser will preserve it as well.
Copy link
Contributor

@acoulton acoulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stof

@acoulton acoulton merged commit 85916b7 into Behat:master Nov 5, 2025
19 checks passed
@stof stof deleted the support_future_gherkin branch November 6, 2025 00:09
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 this pull request may close these issues.

2 participants