fix(python): highlight all types of docstrings (#7788)

This commit is contained in:
Jakob Zahn 2025-04-03 09:35:41 +02:00 committed by GitHub
parent 30654ee72a
commit 997288c552
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 124 additions and 21 deletions

View file

@ -80,27 +80,9 @@
] @string.escape
; doc-strings
(module
.
(comment)*
.
(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)))
(expression_statement
(string
(string_content) @spell) @string.documentation)
; Tokens
[