From 7e01194639de113531e4ee928d38e2d08c9ce5de Mon Sep 17 00:00:00 2001 From: Jakob Zahn Date: Wed, 2 Apr 2025 10:17:06 +0200 Subject: [PATCH] Treat every standalone string as docstring --- queries/python/highlights.scm | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index 84b29412a..bf12846e9 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -80,27 +80,10 @@ ] @string.escape ; doc-strings -(module - . - (comment)* - . - (expression_statement - (string - (string_content) @spell) @string.documentation)) +(expression_statement + (string + (string_content) @spell) @string.documentation) -(class_definition - body: (block - . - (expression_statement - (string - (string_content) @spell) @string.documentation))) - -(function_definition - body: (block - . - (expression_statement - (string - (string_content) @spell) @string.documentation))) ; Tokens [