Need to use expression_statement here.
@@ -9,10 +9,14 @@ fn test_tags_javascript() {
r#"
((function_definition
name: (identifier) @name
- body: (block . (string) @doc)) @function
+ body: (block . (expression_statement (string) @doc))) @function
(set! replace @doc "(^['\s]*)|(['\s]*$)"))
(function_definition
name: (identifier) @name) @function
+ ((class_definition
+ name: (identifier) @name
+ body: (block . (expression_statement (string) @doc))) @class
+ (set! replace @doc "(^['\s]*)|(['\s]*$)"))
(class_definition
name: (identifier) @name) @class
(call
