tree-sitter-langs icon indicating copy to clipboard operation
tree-sitter-langs copied to clipboard

broken multiline string highlight in python

Open swi2012 opened this issue 2 years ago • 0 comments

commit e447e2224217afc39601edcd55936389afaeb9a8 broke multiline python highlighting shown all triple quoted strings as docstring. I've make this little changes at it's fixed problem on my side:

queries/python/highlights.scm
@@ -164,7 +164,7 @@
 
 (comment) @comment
 ((string) @doc
- (.match? @doc "^(\"\"\"|r\"\"\")"))
+ (.match? @doc "\)^(\"\"\"|r\"\"\")"))
 (string) @string
 
 (decorator) @function.special

swi2012 avatar Jan 23 '23 09:01 swi2012