Commits

Armin Ronacher committed 035cfec

Regular expressions are now lexed in subscripts

Comments (0)

Files changed (1)

pygments/lexers/agile.py

                  r'(?<=^if\s)|'
                  r'(?<=^elsif\s)'
              r')(\s*)(/)', bygroups(Text, String.Regex), 'multiline-regex'),
-            # multiline regex (in method calls)
-            (r'(?<=\(|,)/', String.Regex, 'multiline-regex'),
+            # multiline regex (in method calls or subscripts)
+            (r'(?<=\(|,|\[)/', String.Regex, 'multiline-regex'),
             # multiline regex (this time the funny no whitespace rule)
             (r'(\s+)(/)(?![\s=])', bygroups(Text, String.Regex),
              'multiline-regex'),