lib/rouge/lexers/ruby.rb in rouge-3.5.1 vs lib/rouge/lexers/ruby.rb in rouge-3.6.0

- old
+ new

@@ -9,11 +9,11 @@ tag 'ruby' aliases 'rb' filenames '*.rb', '*.ruby', '*.rbw', '*.rake', '*.gemspec', '*.podspec', 'Rakefile', 'Guardfile', 'Gemfile', 'Capfile', 'Podfile', 'Vagrantfile', '*.ru', '*.prawn', 'Berksfile', '*.arb', - 'Dangerfile' + 'Dangerfile', 'Fastfile', 'Deliverfile', 'Appfile' mimetypes 'text/x-ruby', 'application/x-ruby' def self.detect?(text) return true if text.shebang? 'ruby' @@ -181,10 +181,10 @@ rule %r/\$-[0adFiIlpvw]/, Name::Variable::Global rule %r/::/, Operator mixin :strings - rule %r/(?:#{keywords.join('|')})\b/, Keyword, :expr_start + rule %r/(?:#{keywords.join('|')})(?=\W|$)/, Keyword, :expr_start rule %r/(?:#{keywords_pseudo.join('|')})\b/, Keyword::Pseudo, :expr_start rule %r( (module) (\s+)