mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
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.
This commit is contained in:
parent
8ab64a37ea
commit
2c13e88c31
1 changed files with 5 additions and 1 deletions
|
|
@ -80,7 +80,11 @@
|
||||||
] @string.escape
|
] @string.escape
|
||||||
|
|
||||||
; doc-strings
|
; doc-strings
|
||||||
(expression_statement
|
(module
|
||||||
|
(string
|
||||||
|
(string_content) @spell) @string.documentation)
|
||||||
|
|
||||||
|
(block
|
||||||
(string
|
(string
|
||||||
(string_content) @spell) @string.documentation)
|
(string_content) @spell) @string.documentation)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue