lib/rouge/lexers/matlab.rb in rouge_ecl-0.0.1 vs lib/rouge/lexers/matlab.rb in rouge_ecl-1.0.0

- old
+ new

@@ -8,9 +8,13 @@ tag 'matlab' aliases 'm' filenames '*.m' mimetypes 'text/x-matlab', 'application/x-matlab' + def self.analyze_text(text) + return 0.4 if text =~ /^\s*% / # % comments are a dead giveaway + end + def self.keywords @keywords = Set.new %w( break case catch classdef continue else elseif end for function global if otherwise parfor persistent return spmd switch try while )