lib/rouge/lexers/python.rb in rouge-2.2.1 vs lib/rouge/lexers/python.rb in rouge-3.0.0
- old
+ new
@@ -8,11 +8,11 @@
tag 'python'
aliases 'py'
filenames '*.py', '*.pyw', '*.sc', 'SConstruct', 'SConscript', '*.tac'
mimetypes 'text/x-python', 'application/x-python'
- def self.analyze_text(text)
- return 1 if text.shebang?(/pythonw?(3|2(\.\d)?)?/)
+ def self.detect?(text)
+ return true if text.shebang?(/pythonw?(3|2(\.\d)?)?/)
end
def self.keywords
@keywords ||= %w(
assert break continue del elif else except exec