summaryrefslogtreecommitdiff
path: root/pygments/lexers/ruby.py
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2014-10-15 22:13:59 -0700
committerTim Hatch <tim@timhatch.com>2014-10-15 22:13:59 -0700
commit86c2eee37cf292677032e02f553710d4c1eb1f04 (patch)
tree12de020d6fef10c028344a0fc320a6ab750f48d1 /pygments/lexers/ruby.py
parent78e09bf1384aa4439f56811b08a2b79ddd440b77 (diff)
downloadpygments-86c2eee37cf292677032e02f553710d4c1eb1f04.tar.gz
Curly brace escaping, round 1.
These locations were all found by regexlint and done semi-manually, leaving braces within [] alone (they aren't special in the 'regex' module).
Diffstat (limited to 'pygments/lexers/ruby.py')
-rw-r--r--pygments/lexers/ruby.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/ruby.py b/pygments/lexers/ruby.py
index 2becb101..638789d0 100644
--- a/pygments/lexers/ruby.py
+++ b/pygments/lexers/ruby.py
@@ -451,7 +451,7 @@ class FancyLexer(RegexLexer):
(r'/(\\\\|\\/|[^/])*/[egimosx]*', String.Regex, '#pop'),
(r'!(\\\\|\\!|[^!])*![egimosx]*', String.Regex, '#pop'),
(r'\\(\\\\|[^\\])*\\[egimosx]*', String.Regex, '#pop'),
- (r'{(\\\\|\\}|[^}])*}[egimosx]*', String.Regex, '#pop'),
+ (r'\{(\\\\|\\\}|[^}])*\}[egimosx]*', String.Regex, '#pop'),
(r'<(\\\\|\\>|[^>])*>[egimosx]*', String.Regex, '#pop'),
(r'\[(\\\\|\\\]|[^\]])*\][egimosx]*', String.Regex, '#pop'),
(r'\((\\\\|\\\)|[^\)])*\)[egimosx]*', String.Regex, '#pop'),
@@ -463,7 +463,7 @@ class FancyLexer(RegexLexer):
(r'\s+', Text),
# balanced delimiters (copied from PerlLexer):
- (r's{(\\\\|\\}|[^}])*}\s*', String.Regex, 'balanced-regex'),
+ (r's\{(\\\\|\\\}|[^}])*\}\s*', String.Regex, 'balanced-regex'),
(r's<(\\\\|\\>|[^>])*>\s*', String.Regex, 'balanced-regex'),
(r's\[(\\\\|\\\]|[^\]])*\]\s*', String.Regex, 'balanced-regex'),
(r's\((\\\\|\\\)|[^\)])*\)\s*', String.Regex, 'balanced-regex'),