1. Rob Hoelz
  2. pygments-main

Commits

Rob Hoelz  committed 7ea3aff

Allow mixed bracketing characters in special quoted strings

  • Participants
  • Parent commits b4a32eb
  • Branches default

Comments (0)

Files changed (1)

File pygments/lexers/agile.py

View file
  • Ignore whitespace
             ( r'::[?]\w+', Name.Variable.Global ),
             ( r'[$@%&][*][' + PERL6_IDENTIFIER_CHARS + u']+(?:<<.*?>>|<.*?>|«.*?»)*', Name.Variable.Global ),
             ( r'[$](?:<.*?>)+', Name.Variable ), # XXX what about for special variables (like $/)? should I enter a variable state?
-            ( r'(?:q|qq|Q)[a-zA-Z]?\s*(?P<adverbs>:[\w\s:]+)?\s*(?P<delimiter>[^0-9a-zA-Z:\s]+)', brackets_callback(String) ),
+            ( r'(?:q|qq|Q)[a-zA-Z]?\s*(?P<adverbs>:[\w\s:]+)?\s*(?P<delimiter>(?P<first_char>[^0-9a-zA-Z:\s])(?P=first_char)*)', brackets_callback(String) ),
             # copied from PerlLexer
             ( r'0_?[0-7]+(_[0-7]+)*', Number.Oct ),
             ( r'0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*', Number.Hex ),