diff --git a/tree-sitter-highlight.el b/tree-sitter-highlight.el index b4cda5ef..6b2e7128 100644 --- a/tree-sitter-highlight.el +++ b/tree-sitter-highlight.el @@ -231,10 +231,9 @@ to faces. Each function takes no arguments." tree-sitter-highlight--injections-query #'ts-node-text (lambda (start end) - (put-text-property (ts-byte-to-position start) - (ts-byte-to-position end) - 'face - nil)) + (remove-text-properties (ts-byte-to-position start) + (ts-byte-to-position end) + '(face nil))) (lambda (language) (car (tree-sitter-highlight--get-injection (intern language)))) (lambda (language)