What does red text on a green line mean in a AWS Pull Request diff?

Today I saw this for the first time in a pull request diff in AWS. The line is green and with a plus, so it is added. But the text is red and with slightly red background. The file is a SpecFlow (*.feature) file.

Does it signify spell-checker, or something else?

enter image description here


Solution 1:

I have never used SpecFlow or AWS CodeCommit, but a little bit of experimentation (for lack of thorough available documentation) strongly suggests that AndrewF's suspicion is correct:

aws-codecommit diff between two SpecFlow feature files

Syntax highlighting rules highlight invalid statements for a SpecFlow feature file (example found on toolsqa.com) are highlighted with red background. On the left, the same rule seems to cause the grey background for removed invalid statements.

The highlighting rules seem to support And clauses, just not in the Then part of a scenario, although the language grammar seems to allow this. I blame a bad syntax highlighting rule.

However, I have a hard time finding a formal grammar specification for Cuccumber/Gherkin that would tell me exactly what is and isn't allowed where (and what a compliant parser would make of it).

Edit

Why didn't I think of checking the source view first? Looking at the HTML/CSS rules of the above diff, one can see the markup in black and white: Red background equals <span class="err">. The same applies to the grey Foo on the left side of the diff.

Source view of the diff