mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix #4431: don't use // in [JT]SX markup
This commit is contained in:
@ -65,12 +65,9 @@
|
|||||||
|
|
||||||
(add-to-list 'web-mode-engines-alist '("elixir" . "\\.eex\\'"))
|
(add-to-list 'web-mode-engines-alist '("elixir" . "\\.eex\\'"))
|
||||||
|
|
||||||
(let ((types '("javascript" "jsx")))
|
;; Use // instead of /* as the default comment delimited in JS
|
||||||
(setq web-mode-comment-formats
|
(setf (alist-get "javascript" web-mode-comment-formats nil nil #'equal)
|
||||||
(cl-remove-if (lambda (item) (member (car item) types))
|
"//")
|
||||||
web-mode-comment-formats))
|
|
||||||
(dolist (type types)
|
|
||||||
(push (cons type "//") web-mode-comment-formats)))
|
|
||||||
|
|
||||||
(add-hook! 'web-mode-hook
|
(add-hook! 'web-mode-hook
|
||||||
(defun +web--fix-js-comments-h ()
|
(defun +web--fix-js-comments-h ()
|
||||||
|
Reference in New Issue
Block a user