gherkin icon indicating copy to clipboard operation
gherkin copied to clipboard

feat(gherkin): added custom flavor registry

Open sashokbg opened this issue 2 years ago • 2 comments

🤔 What's changed?

Added the ability to register custom token matcher for custom "gherkin flavors". "generateMessages" and "makeSourceEnvelopes" will try to match the file extension / media type with the according custom flavor and use the appropriate matcher.

⚡️ What's your motivation?

I would like to implement a custom "flavor" using asciidoc much like the one with markdown that already exists in the repository.

Also implementing such feature adds an SPI-like capabilities for everyone to implement whatever they like as "flavors" and keeps the open / close principle.

related to #10

🏷️ What kind of change is this?

  • :zap: New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • [x] I agree to respect and uphold the Cucumber Community Code of Conduct
  • [X] I've changed the behaviour of the code
    • [X ] I have added/updated tests to cover my changes.
  • [X] 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.

sashokbg avatar Feb 22 '23 07:02 sashokbg

bump any comments/discussion are greatly appreciated @aslakhellesoy

sashokbg avatar Mar 05 '23 10:03 sashokbg