Commits

Erik Formella committed ded25b8

Highlight any ruby as ruby inside #{} interpolations. Also show example in test.rb

  • Participants
  • Parent commits 5cc9495

Comments (0)

Files changed (2)

pygments/lexers/agile.py

             include('root')
         ],
         'in-intp': [
-            ('}', String.Interpol, '#pop'),
+            ('}', Text, '#pop'),
             include('root'),
         ],
         'string-intp': [
-            (r'#{', String.Interpol, 'in-intp'),
+            (r'#{', Text, 'in-intp'),
             (r'#@@?[a-zA-Z_][a-zA-Z0-9_]*', String.Interpol),
             (r'#\$[a-zA-Z_][a-zA-Z0-9_]*', String.Interpol)
         ],

tests/examplefiles/test.rb

 end
 addinfix("concat")
 p `[1,2,3] concat [4,5,6]` # => [1, 2, 3, 4, 5, 6]
+p "interpolation strings contain valid ruby code #{"so we can put strings in here, as well as #{"more interpolations"}"}"
+p "numbers #{2.times { puts "the number #{2}" }}"
 
 
 # HEREDOC FUN!!!!!!!1111