diff options
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | pygments/lexers/agile.py | 2 | ||||
-rw-r--r-- | tests/examplefiles/condensed_ruby.rb | 2 |
3 files changed, 2 insertions, 4 deletions
@@ -32,7 +32,7 @@ for 0.6 * bash * mysql/postgresql/sqlite * tcl - * (la)tex + * latex special formatting? - tell the PHP and DelphiLexer how to differ between Operators and text. diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index 707bad33..ee0cd368 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -392,7 +392,7 @@ class RubyLexer(ExtendedRegexLexer): r'warn)\b', Name.Builtin), (r'__(FILE|LINE)__\b', Name.Builtin.Pseudo), # normal heredocs - (r'(<<-?)(["`\']?)([a-zA-Z_]\w*)(\2)(.*?\n)', heredoc_callback), + (r'(?<!\w)(<<-?)(["`\']?)([a-zA-Z_]\w*)(\2)(.*?\n)', heredoc_callback), # empty string heredocs (r'(<<-?)("|\')()(\2)(.*?\n)', heredoc_callback), (r'__END__', Comment.Preproc, 'end-part'), diff --git a/tests/examplefiles/condensed_ruby.rb b/tests/examplefiles/condensed_ruby.rb index ee670ff8..afe57aaa 100644 --- a/tests/examplefiles/condensed_ruby.rb +++ b/tests/examplefiles/condensed_ruby.rb @@ -8,5 +8,3 @@ x(U)).each{|n|p,c=x(n),c(n);(c.f(p,O[0],0).map{|f|s f}-D["*"]).each{|f|F.open(f, "w"){|o|o<<c.f(p,f,1)}}}||(DRb.start_service U,C.new{def f(c,a=[],t=2)c==x(U)&&( t==0&&D[s(a)]||t==1&&F.read(s(a))||p(a))end;def y()(p(U)+p).each{|u|c(u).f(x(u), p(U))rescue()};self;end;private;def p(x=[]);O.push(*x).uniq!;O;end}.new.y;sleep) -t==0&&D[s(a)]||t==1&&F.read(s(a))||p(a))end;def y()(p(U)+p).each{|u|c(u).f(x(u), -p(U))rescue()};self;end;private;def p(x=[]);O.push(*x).uniq!;O;end}.new.y;sleep) |