Skip to content

Commit 88066da

Browse files
committed
Fixes #424 - @TypeDoc recognized as heredoc
1 parent bd417aa commit 88066da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

elixir-mode.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ just return nil."
456456
(defun elixir-mode-fill-doc-string ()
457457
(interactive)
458458
(save-excursion
459-
(re-search-backward "@\\(?:module\\)?doc +\"\"\"" nil t)
459+
(re-search-backward (rx "@" (or "moduledoc" "typedoc" "doc") space "\"\"\"") nil t)
460460
(re-search-forward "\"\"\"" nil t)
461461
(set-mark (point))
462462
(re-search-forward "\"\"\"" nil t)
@@ -495,7 +495,7 @@ just return nil."
495495
(when pos
496496
(save-excursion
497497
(goto-char pos)
498-
(and (looking-at "\"\"\"")(looking-back "@moduledoc[ \]+\\|@doc[ \]+"
498+
(and (looking-at "\"\"\"")(looking-back (rx "@" (or "moduledoc" "typedoc" "doc") (+ space))
499499
(line-beginning-position)))))))
500500

501501
(defun elixir-font-lock-syntactic-face-function (state)

0 commit comments

Comments
 (0)