From ca36e22af031f58798bd65ab95219784519f29c2 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Tue, 26 Jan 2021 13:52:28 +0100 Subject: [PATCH] Add defn to monarch_language.js (#15) * Add defn * Update monarch_language.js * Update monarch_language.js --- assets/js/editor/elixir/monarch_language.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/editor/elixir/monarch_language.js b/assets/js/editor/elixir/monarch_language.js index 3802f96ea..e9ce04a17 100644 --- a/assets/js/editor/elixir/monarch_language.js +++ b/assets/js/editor/elixir/monarch_language.js @@ -28,6 +28,8 @@ const ElixirMonarchLanguage = { declarationKeywords: [ "def", "defp", + "defn", + "defnp", "defguard", "defguardp", "defmacro", @@ -174,7 +176,7 @@ const ElixirMonarchLanguage = { // Note: given `def a + b, do: nil`, `a` is not a function name, // so we use negative look-ahead to ensure there's no operator. [ - /\b(defp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/, + /\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/, [ "keyword.declaration", "white",