From cb79d2446196d25607eb1d982c96939abdf67b8e Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Thu, 25 Jan 2024 16:14:41 -0500 Subject: 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. ``` --- queries/python/highlights.scm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'queries/python') diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index 329df4f14..0c7147b51 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -199,6 +199,8 @@ ; doc-strings (module + . + (comment)* . (expression_statement (string) @string.documentation @spell)) -- cgit v1.2.3-70-g09d2