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

Fix gherkin-python for compiling example values with trailing backslash #2048

Merged
merged 5 commits into from
Aug 12, 2022

Conversation

brasmusson
Copy link
Contributor

Summary

Fix gherkin-python for compiling example values with trailing backslash. Fixes #1954.

Details

Trailing backslash in example cell values need special treatment with using regular expression replacements in the expansion of steps with respect to example tables.

Motivation and Context

Fixes #1954.

How Has This Been Tested?

Acceptance test added for the case of trailing backslash in example values.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • The change has been ported to Java.
  • The change has been ported to Ruby.
  • The change has been ported to JavaScript.
  • The change has been ported to Go.
  • The change has been ported to .NET.
  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have updated the CHANGELOG accordingly.

In case of trailing backslash in example values, backslashes in the
example values needs to be re-escaped before using regular expression
substitions of the example values in the step text.
@brasmusson brasmusson merged commit 590f62c into main Aug 12, 2022
@brasmusson brasmusson deleted the gherkin-python-fix-compiling-for-trailing-backslash branch August 12, 2022 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling fails if last character is backslash at example table cell
2 participants