mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(python): allow comments before module docstring
Example: ```python #!/usr/bin/env/python # some comment before module docstring # Copyright (c) LICENSE foo bar """module docstring.""" ``` Python indeed recognizes it: ``` $ python -c 'import testfile; print(testfile.__doc__)' module docstring. ```
This commit is contained in:
parent
ce4adf11cf
commit
cb79d24461
1 changed files with 2 additions and 0 deletions
|
|
@ -199,6 +199,8 @@
|
|||
|
||||
; doc-strings
|
||||
(module
|
||||
.
|
||||
(comment)*
|
||||
.
|
||||
(expression_statement
|
||||
(string) @string.documentation @spell))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue