From ec6307e5b042c73c5a26a75c7b6737b8efa85493 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Fri, 28 Jun 2024 09:41:53 +0300 Subject: refactor(python): merge docstring queries --- queries/python/highlights.scm | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'queries/python') diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index 5e5a2a88d..b4fa1fc46 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -199,46 +199,27 @@ ] @string.escape ; doc-strings -(module - . - (comment)* - . - (expression_statement - (string) @string.documentation)) - -(class_definition - body: (block - . - (expression_statement - (string) @string.documentation))) - -(function_definition - body: (block - . - (expression_statement - (string) @string.documentation))) - (module . (comment)* . (expression_statement (string - (string_content) @spell))) + (string_content) @spell) @string.documentation)) (class_definition body: (block . (expression_statement (string - (string_content) @spell)))) + (string_content) @spell) @string.documentation))) (function_definition body: (block . (expression_statement (string - (string_content) @spell)))) + (string_content) @spell) @string.documentation))) ; Tokens [ -- cgit v1.2.3-70-g09d2