Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion elixir-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ is used to limit the scan."
(when (memq start-delim '(?' ?\"))
(setq end (1+ end))
(forward-char -1))
(while (re-search-forward "[\"']" end t)
(while (re-search-forward "[\"'#]" end t)
(put-text-property (1- (point)) (point) 'syntax-table word-syntax))))))

(defun elixir-syntax-propertize-function (start end)
Expand Down
8 changes: 8 additions & 0 deletions test/elixir-mode-font-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,14 @@ foo
(should (eq (elixir-test-face-at 53) 'font-lock-string-face))
(should (eq (elixir-test-face-at 55) 'font-lock-string-face))))

(ert-deftest elixir-mode-syntax-table/hashmark-in-sigils ()
"Don't treat hashmark in sigils as comment"
:tags '(fontification syntax-table)
(elixir-test-with-temp-buffer
"~s(# foo)"
(should-not (eq (elixir-test-face-at 4) 'font-lock-comment-face))
(should (eq (elixir-test-face-at 6) 'font-lock-string-face))))

(provide 'elixir-mode-font-test)

;;; elixir-mode-font-test.el ends here