Skip to content

Commit 0212b06

Browse files
authored
Merge pull request #470 from J3RN/map-newline-highlight
Highlight atom map keys that end with a newline
2 parents d8c29c7 + ad14799 commit 0212b06

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

elixir-mode.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ is used to limit the scan."
427427
1 font-lock-variable-name-face)
428428

429429
;; Map keys
430-
(,(elixir-rx (group (and identifiers ":")) space)
430+
(,(elixir-rx (group (and identifiers ":")) (or space "\n"))
431431
1 elixir-atom-face)
432432

433433
;; Pseudovariables

tests/elixir-mode-font-test.el

+6-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,12 @@ true_false_nil
250250
;; https://github.com/elixir-editors/emacs-elixir/issues/320
251251
(elixir-test-with-temp-buffer
252252
"<<foo::bar>>"
253-
(should-not (eq (elixir-test-face-at 3) 'elixir-atom-face))))
253+
(should-not (eq (elixir-test-face-at 3) 'elixir-atom-face)))
254+
255+
(elixir-test-with-temp-buffer
256+
"%{key:
257+
a_very_long_value_that_needed_to_wrap}"
258+
(should (eq (elixir-test-face-at 3) 'elixir-atom-face))))
254259

255260
(ert-deftest elixir-mode-syntax-table/fontify-interpolation ()
256261
:tags '(fontification interpolation syntax-table)

0 commit comments

Comments
 (0)