Skip to content

Markdown support for Perl#399

Merged
mpkorstanje merged 11 commits intocucumber:mainfrom
fperrad:MDG_with_Perl
Jun 30, 2025
Merged

Markdown support for Perl#399
mpkorstanje merged 11 commits intocucumber:mainfrom
fperrad:MDG_with_Perl

Conversation

@fperrad
Copy link
Copy Markdown
Contributor

@fperrad fperrad commented May 21, 2025

🤔 What's changed?

Adding Markdown with Gherkin (MDG) support for Perl.

⚡️ What's your motivation?

🏷️ What kind of change is this?

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

♻️ Anything particular you want feedback on?

Javascript is the reference implementation for MDG, but it lacks the gherkin-generate-tokens (and the corresponding tests).

So, I am not confident with the test suite.

Some points need clarification:

  • with MDG, the messages Comment are skipped when building the AST : bug or feature ? (feature)
  • I try to reuse testdata/good/*.feature.md.tokens from Markdown support for java #377, but there need some changes. So, these files need a review / validation.

📋 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.

@mpkorstanje
Copy link
Copy Markdown
Contributor

with MDG, the messages Comment are skipped when building the AST : bug or feature ?

I'm not sure if I understand this. I don't think Markdown supports comments. What would a comment in Markdown look like?

Javascript is the reference implementation for MDG, but it lacks the gherkin-generate-tokens (and the corresponding tests).

Would you be able to add the functionality to generate tokens to the JS implementation?

Copy link
Copy Markdown
Contributor

@mpkorstanje mpkorstanje left a comment

Choose a reason for hiding this comment

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

I've given this a once over. Other than my remark on the AST builder I don't see anything too odd. But this PR also exceeds my current capacity for in-depth review.

@ehuelsmann would you be so kind?

@mpkorstanje mpkorstanje requested a review from ehuelsmann May 21, 2025 22:24
@ehuelsmann ehuelsmann self-assigned this May 22, 2025
@fperrad
Copy link
Copy Markdown
Contributor Author

fperrad commented May 22, 2025

Would you be able to add the functionality to generate tokens to the JS implementation?

sorry, I can't.

@fperrad
Copy link
Copy Markdown
Contributor Author

fperrad commented May 27, 2025

rebased, and the commit "[Perl] don't populate comments in AST when MDG" was replaced by "[Perl] ignore Comment in AST"

Copy link
Copy Markdown
Contributor

@ehuelsmann ehuelsmann left a comment

Choose a reason for hiding this comment

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

Yes. This is now the equivalent of the JS code. Very good.

While you were heads down implementing this MD support, the project received and fixed #400. Based on my review of the JS code and this PR both are lacking the required fix. Please add the fix and I'll PR for JS. [Edit: I reviewed main and came to the conclusion that it's actually there, but apparently not where I was looking for it.]

Addresses my comment to have consistency between the regular and Markdown
token parser implementations.
@ehuelsmann ehuelsmann self-requested a review May 28, 2025 18:50
Copy link
Copy Markdown
Contributor

@ehuelsmann ehuelsmann left a comment

Choose a reason for hiding this comment

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

I approve of the current state.

@ehuelsmann
Copy link
Copy Markdown
Contributor

@fperrad out of curiosity, where does your interest in contributing GherkinInMarkdown from? Are you planning to use this Perl implementation yourself?

@ehuelsmann
Copy link
Copy Markdown
Contributor

@mpkorstanje lets wait a few days for the Python implementation to be ready for merging too. Then we can release both in a single release.

@mpkorstanje
Copy link
Copy Markdown
Contributor

I would say that more than a few days have passed. 😉

@mpkorstanje mpkorstanje merged commit 96b5f3f into cucumber:main Jun 30, 2025
37 checks passed
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.

3 participants