antham / ghokin

Parallelized formatter with no external dependencies for gherkin (cucumber, behat...)
MIT License
43 stars 5 forks source link

Feature Request: Extra indentation of AND #104

Closed mathisloge closed 1 year ago

mathisloge commented 1 year ago

Hey, would it be possible to add a config parameter to add an extra indentation of AND? e.g.:

SCENATRIO ...
    GIVEN ....
        AND ....
        AND ...
    WHEN ...
    THEN ....
        AND ....
antham commented 1 year ago

Hi, I think what you ask is the same kind of thing that what was requested in a previous issue, see my answer here => https://github.com/antham/ghokin/issues/64#issuecomment-1445219798

mathisloge commented 1 year ago

Kind of goes into the same direction. I think this one is more of a standard use case, e.g. https://support.smartbear.com/cucumberstudio/docs/bdd/write-gherkin-scenarios.html

If you don't want to add this, could you point me to the appropiate location of the source code where it would make the most sense to implement it? Never written go before. ^^

antham commented 1 year ago

When you look at the official cucumber documentation they don't do that https://cucumber.io/docs/gherkin/reference/ , but I admit the rendering increase the readability.

The indent is done here => https://github.com/antham/ghokin/blob/06a32290f2b122c2c1263f28670fd5c83c173d3a/ghokin/transformer.go#L36