lib/rouge/lexers/r.rb in rouge-2.0.7 vs lib/rouge/lexers/r.rb in rouge-2.1.0
- old
+ new
@@ -46,11 +46,11 @@
def self.analyze_text(text)
return 1 if text.shebang? 'Rscript'
end
state :root do
- rule /#'.*?\n/, Comment::Doc
- rule /#.*?\n/, Comment::Single
+ rule /#'.*?$/, Comment::Doc
+ rule /#.*?$/, Comment::Single
rule /\s+/m, Text::Whitespace
rule /`[^`]+?`/, Name
rule /'(\\.|.)*?'/m, Str::Single
rule /"(\\.|.)*?"/m, Str::Double