diff options
author | Tim Hatch <tim@timhatch.com> | 2014-10-15 22:46:09 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-10-15 22:46:09 -0700 |
commit | 9d8ee43c77a6d0bf172ae09d31a7c249ed37f925 (patch) | |
tree | 3ffebe276a12c32d078a76dffd50bbaabebd5ffb /pygments/lexers/parsers.py | |
parent | 86c2eee37cf292677032e02f553710d4c1eb1f04 (diff) | |
download | pygments-9d8ee43c77a6d0bf172ae09d31a7c249ed37f925.tar.gz |
Curly brace escaping, round 2.
These were all pointed out by regexlint but required manual effort to track down
(indicator.py was confused by most of them being produced by expressions).
Also comment out some iffy comment patterns.
Diffstat (limited to 'pygments/lexers/parsers.py')
-rw-r--r-- | pygments/lexers/parsers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/parsers.py b/pygments/lexers/parsers.py index e89602c6..e84447b3 100644 --- a/pygments/lexers/parsers.py +++ b/pygments/lexers/parsers.py @@ -173,8 +173,8 @@ class RagelEmbeddedLexer(RegexLexer): (r'(' + r'|'.join(( # keep ragel code in largest possible chunks. r'(' + r'|'.join(( r'[^}\'"\[/#]', # exclude unsafe characters - r'}(?=[^%]|$)', # } is okay as long as it's not followed by % - r'}%(?=[^%]|$)', # ...well, one %'s okay, just not two... + r'\}(?=[^%]|$)', # } is okay as long as it's not followed by % + r'\}%(?=[^%]|$)', # ...well, one %'s okay, just not two... r'[^\\]\\[{}]', # ...and } is okay if it's escaped # allow / if it's preceded with one of these symbols @@ -202,7 +202,7 @@ class RagelEmbeddedLexer(RegexLexer): r'\#.*$\n?', # ruby/ragel comment )) + r')+', using(RagelLexer)), - (r'}%%', Punctuation, '#pop'), + (r'\}%%', Punctuation, '#pop'), ] } |