File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -456,7 +456,7 @@ just return nil."
456
456
(defun elixir-mode-fill-doc-string ()
457
457
(interactive )
458
458
(save-excursion
459
- (re-search-backward " @ \\ (?:module \\ )? doc + \"\"\" " nil t )
459
+ (re-search-backward ( rx " @ " ( or " moduledoc " " typedoc " " doc" ) space " \"\"\" " ) nil t )
460
460
(re-search-forward " \"\"\" " nil t )
461
461
(set-mark (point ))
462
462
(re-search-forward " \"\"\" " nil t )
@@ -495,7 +495,7 @@ just return nil."
495
495
(when pos
496
496
(save-excursion
497
497
(goto-char pos)
498
- (and (looking-at " \"\"\" " )(looking-back " @ moduledoc[ \] + \\ |@ doc[ \] + "
498
+ (and (looking-at " \"\"\" " )(looking-back ( rx " @ " ( or " moduledoc" " typedoc " " doc" ) ( + space))
499
499
(line-beginning-position )))))))
500
500
501
501
(defun elixir-font-lock-syntactic-face-function (state )
Original file line number Diff line number Diff line change @@ -199,6 +199,14 @@ end"
199
199
(should (eq (elixir-test-face-at 2 ) 'font-lock-builtin-face ))
200
200
(should (eq (elixir-test-face-at 3 ) 'font-lock-string-face ))))
201
201
202
+ (ert-deftest elixir-mode-syntax-table/fontify-heredoc/4 ()
203
+ :tags '(fontification heredoc syntax-table)
204
+ (elixir-test-with-temp-buffer
205
+ " @typedoc \"\"\" "
206
+ (should (eq (elixir-test-face-at 1 ) 'elixir-attribute-face ))
207
+ (should (eq (elixir-test-face-at 2 ) 'elixir-attribute-face ))
208
+ (should (eq (elixir-test-face-at 10 ) 'font-lock-doc-face ))))
209
+
202
210
(ert-deftest elixir-mode-syntax-table/fontify-atoms ()
203
211
:tags '(fontification atom syntax-table)
204
212
(elixir-test-with-temp-buffer
You can’t perform that action at this time.
0 commit comments