From 2c13e88c31581f5725615e4aaee4a7093086f7af Mon Sep 17 00:00:00 2001 From: Omar Valdez Date: Wed, 17 Sep 2025 23:39:57 -0700 Subject: [PATCH] fix(python): correct highlighting of docstrings The node `expression_statement` was changed to a supertype in the python parser, which caused the docstring query to capture all strings as `@string.documentation`. This commit restores the behavior as it was discussed in #7788. --- runtime/queries/python/highlights.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm index 0cdc957d0..0fecd5abd 100644 --- a/runtime/queries/python/highlights.scm +++ b/runtime/queries/python/highlights.scm @@ -80,7 +80,11 @@ ] @string.escape ; doc-strings -(expression_statement +(module + (string + (string_content) @spell) @string.documentation) + +(block (string (string_content) @spell) @string.documentation)