My step uses gherkin expression syntax, and contains optional text marked accordingly with parentheses:
Given("power is (already )on") {...}
(see https://cucumber.io/docs/cucumber/cucumber-expressions/#optional-text)
The scenario using it runs perfectly, but the editor gets it wrong:
If I include the optional text (power is already on), the editor highlights "already" as if it was a parameter.
If I omit the optional text (power is on), the editor marks the whole clause as "undefined step reference"
It looks like the matcher always treats parentheses as parameters like in regex syntax, even though the step actually uses gherkin syntax.
Other parts of gherkin syntax work fine, for instance {string} params
My step uses gherkin expression syntax, and contains optional text marked accordingly with parentheses:
Given("power is (already )on") {...}(see https://cucumber.io/docs/cucumber/cucumber-expressions/#optional-text)
The scenario using it runs perfectly, but the editor gets it wrong:
If I include the optional text (
power is already on), the editor highlights "already" as if it was a parameter.If I omit the optional text (
power is on), the editor marks the whole clause as "undefined step reference"It looks like the matcher always treats parentheses as parameters like in regex syntax, even though the step actually uses gherkin syntax.
Other parts of gherkin syntax work fine, for instance {string} params