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

Support capturing groups in Parameter regex (cucumber-rs/cucumber-expressions#7) #204

Merged
merged 12 commits into from
Feb 10, 2022

Conversation

ilslv
Copy link
Member

@ilslv ilslv commented Feb 8, 2022

Resolves cucumber-rs/cucumber-expressions#7

Synopsis

Currently cucumber-expresions string parameter regex group leaves quotes.

Solution

Add string_<id> name to a string parameter (cucumber-rs/cucumber-expressions#8) regex capture groups and handle it as a special case in cucumber-codegen crate.

Checklist

  • Created PR:
    • In draft mode
    • Name contains Draft: prefix
    • Name contains issue reference
    • Has assignee
  • Documentation is updated (if required)
  • Tests are updated (if required)
  • Changes conform code style
  • CHANGELOG entry is added (if required)
  • FCM (final commit message) is posted
    • and approved
  • Review is completed and changes are approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • Draft: prefix is removed
    • All temporary labels are removed

@ilslv ilslv added the enhancement Improvement of existing features or bugfix label Feb 8, 2022
@ilslv ilslv added this to the 0.11.4 milestone Feb 8, 2022
@ilslv ilslv self-assigned this Feb 8, 2022
@ilslv
Copy link
Member Author

ilslv commented Feb 8, 2022

FCM

Support capturing groups in `Parameter` regex (#204)

- fix `{string}` parameter returning enclosing quotes (cucumber-rs/cucumber-expressions#7)

@ilslv ilslv changed the title Remove leading and trailing quotes for cucumber-expressions string parameter Support for capturing groups in Parameter regex (cucumber-rs/cucumber-expressions#7) Feb 9, 2022
@ilslv ilslv changed the title Support for capturing groups in Parameter regex (cucumber-rs/cucumber-expressions#7) Support capturing groups in Parameter regex (cucumber-rs/cucumber-expressions#7) Feb 9, 2022
@tyranron
Copy link
Member

tyranron commented Feb 10, 2022

@ilslv cucumber-expressions 0.2.0 has been released.

@ilslv
Copy link
Member Author

ilslv commented Feb 10, 2022

This PR kinda breaks public API with step::Context::matches now having regex group names in addition to the captured value, so maybe we should release it as 0.12?

@ilslv ilslv requested a review from tyranron February 10, 2022 10:17
@tyranron
Copy link
Member

@ilslv sure, we should.

@tyranron tyranron added the semver::breaking Represents breaking changes label Feb 10, 2022
@tyranron tyranron merged commit e6fc45c into main Feb 10, 2022
@tyranron tyranron deleted the remove-quotes-from-string-parameter branch February 10, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix semver::breaking Represents breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect extracting of {string}
2 participants