Skip to content

Commit

Permalink
#23: BDD: pipe | to Gherkin Tokenizer.
Browse files Browse the repository at this point in the history
This sign is still not supported by parser but it is now recognized and exception is thrown with 'not supported token' information.
  • Loading branch information
MarcinCelej committed Jan 18, 2024
1 parent 8c14127 commit de7d59c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static IEnumerable<GherkinToken> Tokenize(string[] lines)
yield return new GherkinToken(match.Groups[1].Value, match.Groups[2].Value, line);
}

Regex sentenceRegex = new Regex("^\\s*?(Given|When|Then|And|But|\\*)\\s+?(.+)$", RegexOptions.Multiline);
Regex sentenceRegex = new Regex("^\\s*?(Given|When|Then|And|But|\\*|\\|)\\s+?(.+)$", RegexOptions.Multiline);
if (sentenceRegex.IsMatch(line.Text))
{
var match = sentenceRegex.Match(line.Text);
Expand Down

0 comments on commit de7d59c

Please sign in to comment.