From 121eec784d075abd0cfc60d3260e81aa8480a170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Thu, 8 Apr 2021 12:11:03 +0200 Subject: [PATCH] Properly highlight piping into control flow structures --- assets/js/cell/live_editor/elixir/monarch_language.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/assets/js/cell/live_editor/elixir/monarch_language.js b/assets/js/cell/live_editor/elixir/monarch_language.js index 1a451e87e..8bce33a6c 100644 --- a/assets/js/cell/live_editor/elixir/monarch_language.js +++ b/assets/js/cell/live_editor/elixir/monarch_language.js @@ -222,7 +222,16 @@ const ElixirMonarchLanguage = { [ // Piping into a function (tokenized separately as it may not have parentheses) /(\|>)(\s*)(@variableName)/, - ["operator", "white", "function.call"], + [ + "operator", + "white", + { + cases: { + "@otherKeywords": "keyword", + "@default": "function.call", + }, + }, + ], ], [ // Function reference passed to another function