rust-ts-mode--comment-docstring: Handle block doc comments

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--comment-docstring): Handle block doc comments.
Inhibit match-data modification.
This commit is contained in:
Christophe Troestler 2023-12-02 21:51:15 +01:00 committed by Dmitry Gutov
parent a547b0e2e8
commit a1f88963f5

View file

@ -292,7 +292,7 @@
(let* ((beg (treesit-node-start node)) (let* ((beg (treesit-node-start node))
(face (save-excursion (face (save-excursion
(goto-char beg) (goto-char beg)
(if (looking-at "//\\(?:/\\|!\\)") (if (looking-at "/\\(?:/\\(?:/[^/]\\|!\\)\\|*\\(?:*[^*/]\\|!\\)\\)" t)
'font-lock-doc-face 'font-lock-doc-face
'font-lock-comment-face)))) 'font-lock-comment-face))))
(treesit-fontify-with-override beg (treesit-node-end node) (treesit-fontify-with-override beg (treesit-node-end node)