Skip to content

Conversation

nirajacharya2
Copy link
Contributor

@nirajacharya2 nirajacharya2 commented Jul 25, 2025

🤔 What's changed?

Previously step definitions for function with doc comment didn't work. So, I've adjusted the regex to parse it correctly. Also other few changes:

  • updated the generated step definitions template for php
  • updated the test accordingly

⚡️ What's your motivation?

🏷️ What kind of change is this?

  • 📖 Documentation (improvements without changing code)
  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)
  • 🐛 Bug fix (non-breaking change which fixes a defect)
  • ⚡ New feature (non-breaking change which adds new behaviour)
  • 💥 Breaking change (incompatible changes to the API)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

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

@nirajacharya2 nirajacharya2 marked this pull request as ready for review July 25, 2025 08:55
@nirajacharya2
Copy link
Contributor Author

@luke-hill, @kieran-ryan can you please check this PR?

// match multiline comment
const text = node.text
const match = text.match(/^(\/\*\*[\s*]*)([\s\S]*)(\n[\s]*\*\/)/)
const match = text.match(/@(Given |When |Then )(.*)/)
Copy link
Contributor

Choose a reason for hiding this comment

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

The previous regex, whilst complex, matched a * at the start, which I believe is the comment signifier.

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