Properly highlight piping into control flow structures

This commit is contained in:
Jonatan Kłosko 2021-04-08 12:11:03 +02:00
parent e9766ed7a5
commit 121eec784d

View file

@ -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