diff --git a/elixir-mode.el b/elixir-mode.el index 06dc1fde..e079a84d 100644 --- a/elixir-mode.el +++ b/elixir-mode.el @@ -427,7 +427,7 @@ is used to limit the scan." 1 font-lock-variable-name-face) ;; Map keys - (,(elixir-rx (group (and identifiers ":")) space) + (,(elixir-rx (group (and identifiers ":")) (or space "\n")) 1 elixir-atom-face) ;; Pseudovariables diff --git a/tests/elixir-mode-font-test.el b/tests/elixir-mode-font-test.el index 1ca470e8..1306b3f7 100644 --- a/tests/elixir-mode-font-test.el +++ b/tests/elixir-mode-font-test.el @@ -250,7 +250,12 @@ true_false_nil ;; https://github.com/elixir-editors/emacs-elixir/issues/320 (elixir-test-with-temp-buffer "<>" - (should-not (eq (elixir-test-face-at 3) 'elixir-atom-face)))) + (should-not (eq (elixir-test-face-at 3) 'elixir-atom-face))) + + (elixir-test-with-temp-buffer + "%{key: + a_very_long_value_that_needed_to_wrap}" + (should (eq (elixir-test-face-at 3) 'elixir-atom-face)))) (ert-deftest elixir-mode-syntax-table/fontify-interpolation () :tags '(fontification interpolation syntax-table)