From de7d59c78d2bc4181f5c15e2c3ba6f7e66cfef33 Mon Sep 17 00:00:00 2001 From: Marcin Celej Date: Thu, 18 Jan 2024 06:24:36 +0100 Subject: [PATCH] #23: BDD: pipe | to Gherkin Tokenizer. This sign is still not supported by parser but it is now recognized and exception is thrown with 'not supported token' information. --- .../Gherkin/Tokenizer/GherkinTokenizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Behaviours/Synergy.Behaviours.Testing/Gherkin/Tokenizer/GherkinTokenizer.cs b/Behaviours/Synergy.Behaviours.Testing/Gherkin/Tokenizer/GherkinTokenizer.cs index 057103a..a3cf954 100644 --- a/Behaviours/Synergy.Behaviours.Testing/Gherkin/Tokenizer/GherkinTokenizer.cs +++ b/Behaviours/Synergy.Behaviours.Testing/Gherkin/Tokenizer/GherkinTokenizer.cs @@ -29,7 +29,7 @@ public static IEnumerable 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);