lib/rouge/lexers/r.rb in rouge-1.7.7 vs lib/rouge/lexers/r.rb in rouge-1.8.0
- old
+ new
@@ -1,14 +1,15 @@
# -*- coding: utf-8 -*- #
module Rouge
module Lexers
class R < RegexLexer
+ title "R"
desc 'The R statistics language (r-project.org)'
tag 'r'
aliases 'r', 'R', 's', 'S'
- filenames '*.R', '*.S', '.Rhistory', '.Rprofile'
+ filenames '*.R', '.Rhistory', '.Rprofile'
mimetypes 'text/x-r-source', 'text/x-r', 'text/x-R'
mimetypes 'text/x-r', 'application/x-r'
def self.keywords
@@ -17,10 +18,9 @@
)
end
def self.analyze_text(text)
return 1 if text.shebang? 'Rscript'
- return 0.1 if text.include? '->'
end
state :root do
rule /#.*?\n/, Comment::Single
rule /\s+/m, Text