Skip to content

Commit 50f0fd0

Browse files
committed
Add support for python2/3 shebangs in tree-sitter grammar
1 parent ad49f4a commit 50f0fd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grammars/tree-sitter-python.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parser: 'tree-sitter-python'
55

66
firstLineRegex: [
77
# shebang line
8-
'^#!.*\\b(python)\\r?\\n'
8+
'^#![ \\t]*/.*\\bpython[\\d\\.]*\\b'
99

1010
# vim modeline
1111
'vim\\b.*\\bset\\b.*\\b(filetype|ft|syntax)=python'

0 commit comments

Comments
 (0)