Skip to content

Commit

Permalink
feat!: no longer detect Python2
Browse files Browse the repository at this point in the history
Signed-off-by: Joris Clement <7713214+joclement@users.noreply.github.com>
  • Loading branch information
joclement committed Feb 10, 2025
1 parent 9bbe93e commit 0ae6928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Python < RegexLexer
mimetypes 'text/x-python', 'application/x-python'

def self.detect?(text)
return true if text.shebang?(/pythonw?(?:[23](?:\.\d+)?)?/)
return true if text.shebang?(/pythonw?(?:[3](?:\.\d+)?)?/)
end

def self.keywords
Expand Down

0 comments on commit 0ae6928

Please sign in to comment.