lib/rouge/lexers/ruby.rb in rouge-3.23.0 vs lib/rouge/lexers/ruby.rb in rouge-3.24.0

- old
+ new

@@ -88,11 +88,11 @@ rule %r/"/, Str::Double, :simple_string rule %r/(?<!\.)`/, Str::Backtick, :simple_backtick end state :regex_flags do - rule %r/[mixounse]*/, Str::Regex, :pop! + rule %r/[mixounse]+/, Str::Regex, :pop! end # double-quoted string and symbol [[:string, Str::Double, '"'], [:sym, Str::Symbol, '"'], @@ -265,10 +265,10 @@ rule %r/[#\\\n]/, Str::Heredoc rule %r/[^#\\\n]+/, Str::Heredoc end state :test_heredoc do - rule %r/[^#\\\n]*$/ do |m| + rule %r/[^#\\\n]+$/ do |m| tolerant, heredoc_name = @heredoc_queue.first check = tolerant ? m[0].strip : m[0].rstrip # check if we found the end of the heredoc puts " end heredoc check #{check.inspect} = #{heredoc_name.inspect}" if @debug