branch: elpa/typescript-mode
commit 3361adad6700344163aa7cf15702f4119c8d65bf
Author: Louis-Dominique Dubeau <[email protected]>
Commit: Louis-Dominique Dubeau <[email protected]>
Prevent messing up comment fontification when filling paragraphs.
The code taken from js.el had a bug that caused paragraph filling in
comments to leave parts of the comment with improper
fontification. This change fixes that problem.
---
typescript-mode.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/typescript-mode.el b/typescript-mode.el
index 3265cae358..880aafba6e 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -1921,8 +1921,6 @@ This performs fontification according to
`typescript--class-styles'."
(defun typescript-syntax-propertize (start end)
;; JavaScript allows immediate regular expression objects, written /.../.
- (goto-char start)
- (typescript-syntax-propertize-regexp end)
(funcall
(syntax-propertize-rules
;; Distinguish /-division from /-regexp chars (and from /-comment-starter).
@@ -1945,8 +1943,9 @@ This performs fontification according to
`typescript--class-styles'."
(put-text-property (match-beginning 1) (match-end 1)
'syntax-table (string-to-syntax "\"/"))
(typescript-syntax-propertize-regexp end)))))
+ ;; Hash-bang at beginning of buffer.
("\\`\\(#\\)!" (1 "< b")))
- (point) end))
+ start end))
;;; Indentation