From 0ae6928f958ab06e3ccf8ce8abecd1885199a331 Mon Sep 17 00:00:00 2001 From: Joris Clement <7713214+joclement@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:29:12 +0100 Subject: [PATCH] feat!: no longer detect Python2 Signed-off-by: Joris Clement <7713214+joclement@users.noreply.github.com> --- lib/rouge/lexers/python.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rouge/lexers/python.rb b/lib/rouge/lexers/python.rb index 71fc7bc564..2eace86a60 100644 --- a/lib/rouge/lexers/python.rb +++ b/lib/rouge/lexers/python.rb @@ -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