summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2006-10-30 10:28:26 +0100
committergbrandl <devnull@localhost>2006-10-30 10:28:26 +0100
commit2c0b1bae7a5f3416b75ca76fc93cad8bf422a08d (patch)
treecd9083871c680c73ac13e8e14ac9bc704b47737a
parenta8fdbfc1e96a22fad673e6170822518a292eaf98 (diff)
downloadpygments-2c0b1bae7a5f3416b75ca76fc93cad8bf422a08d.tar.gz
[svn] Fix condensed_ruby example lexing.
-rw-r--r--TODO2
-rw-r--r--pygments/lexers/agile.py2
-rw-r--r--tests/examplefiles/condensed_ruby.rb2
3 files changed, 2 insertions, 4 deletions
diff --git a/TODO b/TODO
index 8ce506c2..18de7073 100644
--- a/TODO
+++ b/TODO
@@ -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)