@@ -167,15 +167,15 @@ end"
167
167
" @doc \"\"\" "
168
168
(should (eq (elixir-test-face-at 1 ) 'elixir-attribute-face ))
169
169
(should (eq (elixir-test-face-at 2 ) 'elixir-attribute-face ))
170
- (should (eq (elixir-test-face-at 6 ) 'font-lock-string -face ))))
170
+ (should (eq (elixir-test-face-at 6 ) 'font-lock-doc -face ))))
171
171
172
172
(ert-deftest elixir-mode-syntax-table/fontify-heredoc/2 ()
173
173
:tags '(fontification heredoc syntax-table)
174
174
(elixir-test-with-temp-buffer
175
175
" @moduledoc \"\"\" "
176
176
(should (eq (elixir-test-face-at 1 ) 'elixir-attribute-face ))
177
177
(should (eq (elixir-test-face-at 2 ) 'elixir-attribute-face ))
178
- (should (eq (elixir-test-face-at 12 ) 'font-lock-string -face ))))
178
+ (should (eq (elixir-test-face-at 12 ) 'font-lock-doc -face ))))
179
179
180
180
(ert-deftest elixir-mode-syntax-table/fontify-heredoc/3 ()
181
181
:tags '(fontification heredoc syntax-table)
@@ -545,6 +545,46 @@ _1_day"
545
545
(should (eq (elixir-test-face-at 2 ) 'font-lock-comment-face ))
546
546
(should (eq (elixir-test-face-at 19 ) 'font-lock-comment-face ))))
547
547
548
+ (ert-deftest elixir-mode-in-docstring ()
549
+ " https://github.com/elixir-lang/emacs-elixir/issues/355"
550
+ :tags 'fontification
551
+ (elixir-test-with-temp-buffer
552
+ " # https://github.com/elixir-lang/emacs-elixir/issues/355
553
+
554
+ @moduledoc \"\"\"
555
+ Everything in here should be gray, including the @moduledoc and triple-quotes
556
+ \"\"\"
557
+
558
+ @doc \"\"\"
559
+ Everything in here should be gray, including the @doc and triple-quotes
560
+ \"\"\" "
561
+ ; ; (switch-to-buffer (current-buffer))
562
+ (search-forward " Everything" )
563
+ (should (elixir--docstring-p))
564
+ (search-forward " Everything" )
565
+ (should (elixir--docstring-p))))
566
+
567
+ (ert-deftest elixir-mode-docstring-face ()
568
+ " https://github.com/elixir-lang/emacs-elixir/issues/355"
569
+ :tags 'fontification
570
+ (elixir-test-with-temp-buffer
571
+ " # https://github.com/elixir-lang/emacs-elixir/issues/355
572
+
573
+ @moduledoc \"\"\"
574
+ Everything in here should be gray, including the @moduledoc and triple-quotes
575
+ \"\"\"
576
+
577
+ @doc \"\"\"
578
+ Everything in here should be gray, including the @doc and triple-quotes
579
+ \"\"\" "
580
+ (switch-to-buffer (current-buffer ))
581
+ (search-forward " Everything" )
582
+ (should (eq 'font-lock-doc-face (get-char-property (point ) 'face )))
583
+ (search-forward " Everything" )
584
+ (should (eq 'font-lock-doc-face (get-char-property (point ) 'face )))))
585
+
586
+
587
+
548
588
(provide 'elixir-mode-font-test )
549
589
550
590
; ;; elixir-mode-font-test.el ends here
0 commit comments