Skip to content

Some keywords should be allowed as free text within node descriptions #329

@acoulton

Description

@acoulton

cucumber/gherkin is relatively relaxed about allowing things that could look like gherkin keywords inside a description element, where in some cases we throw an exception.

It looks like broadly speaking, we parse things that look like keywords and then validate they are allowed in context, where the cucumber/gherkin parser only looks for keywords that are allowed in (or could mark the end of) a context.

For example, with a feature like:

Feature: Examples keyword in feature description

  Examples:
    | any   |
    | thing |

We will throw an exception for an unexpected Examples keyword, but cucumber/gherkin will (perhaps surprisingly) just include the whole example heading and description as part of the feature description.

We ideally need to add some more xxx_keyword_in_xxx_description testdata and contribute them upstream (some might be unexpected behaviour of the upstream parser). We can then make our parser compatible for these examples.

It is probably most sensible to tackle this after we tackle the existing parity issues for element descriptions, since some of this might be covered by existing upstream examples that we're skipping.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions