lib/rouge/lexers/shell.rb in rouge-2.2.1 vs lib/rouge/lexers/shell.rb in rouge-3.0.0

- old
+ new

@@ -11,11 +11,11 @@ filenames '*.sh', '*.bash', '*.zsh', '*.ksh', '.bashrc', '.zshrc', '.kshrc', '.profile', 'PKGBUILD' mimetypes 'application/x-sh', 'application/x-shellscript' - def self.analyze_text(text) - text.shebang?(/(ba|z|k)?sh/) ? 1 : 0 + def self.detect?(text) + return true if text.shebang?(/(ba|z|k)?sh/) end KEYWORDS = %w( if fi else while do done for then return function select continue until esac elif in