lib/rouge/lexers/ruby.rb in rouge-1.7.1 vs lib/rouge/lexers/ruby.rb in rouge-1.7.2

- old
+ new

@@ -339,19 +339,27 @@ Str::Escape rule /\\./, Str::Escape end state :method_call do + rule %r(/) do + token Operator + goto :expr_start + end + + rule(//) { goto :method_call_spaced } + end + + state :method_call_spaced do mixin :whitespace rule %r([%/]=) do token Operator goto :expr_start end rule %r((/)(?=\S|\s*/)) do token Str::Regex - groups Text, Str::Regex goto :slash_regex end rule(%r((?=\s*/))) { pop! }