Skip to content

Commit

Permalink
[gherkin mode]: Add support for Rule Example keywords
Browse files Browse the repository at this point in the history
Co-authored-by: Noor-Masarwe <[email protected]>
  • Loading branch information
Noormasarwa and Noor-Masarwe authored Oct 22, 2024
1 parent 998f328 commit deee5c0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mode/gherkin/gherkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,22 @@ CodeMirror.defineMode("gherkin", function () {
state.inKeywordLine = true;
return "keyword";

// RULE
} else if (state.allowScenario && stream.match(/(規則|ルール|قانون|قواعد|חוק|قاعدة|Правило|Правила|Reegel|Regel|Règle|Regola|Regla|Regulă|Regul|Regula|Regel|Regel|Regula|Правило|Правила|Regel|Regola|Regul|Reeglid|Rule):/)) {
state.allowPlaceholders = false;
state.allowSteps = true;
state.allowBackground = false;
state.allowMultilineArgument = true;
return "keyword";

// EXAMPLE
} else if (state.allowScenario && stream.match(/(例子|例|サンプル|예|דוגמה|مثال|Үрнәк|Пример|Παράδειγμα|Exemplo|Exemple|Beispiel|Ejemplo|Example|Esempio|Örnek|Példa|Pavyzdys|Paraugs|Voorbeeld|Příklad|Príklad|Exemplu|Esempi):/)) {
state.allowPlaceholders = false;
state.allowSteps = true;
state.allowBackground = false;
state.allowMultilineArgument = true;
return "keyword";

// INLINE STRING
} else if (stream.match(/"[^"]*"?/)) {
return "string";
Expand Down

0 comments on commit deee5c0

Please sign in to comment.