From cad4e03a00d6431ccde76a080de2a5b328d54d9d Mon Sep 17 00:00:00 2001 From: farwyler Date: Mon, 20 Jun 2022 17:55:51 +0200 Subject: adds missing tree-sitter-comment injection for js/ts (#2763) --- runtime/queries/javascript/injections.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'runtime/queries/javascript') diff --git a/runtime/queries/javascript/injections.scm b/runtime/queries/javascript/injections.scm index e8429111..af3aef10 100644 --- a/runtime/queries/javascript/injections.scm +++ b/runtime/queries/javascript/injections.scm @@ -22,7 +22,15 @@ ((regex_pattern) @injection.content (#set! injection.language "regex")) - ; Parse JSDoc annotations in comments +; Parse JSDoc annotations in multiline comments ((comment) @injection.content - (#set! injection.language "jsdoc")) + (#set! injection.language "jsdoc") + (#match? @injection.content "^/\\*+")) + +; Parse general tags in single line comments + +((comment) @injection.content + (#set! injection.language "comment") + (#match? @injection.content "^//")) + -- cgit v1.2.3-70-g09d2