diff options
author | murphy <murphy@rubychan.de> | 2011-06-22 07:22:23 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2011-06-22 07:22:23 +0000 |
commit | d6fe4e777a4f543c8828dbf77e955ab38e6c2803 (patch) | |
tree | 7f2a155c7645718f8936e649aee05574cd3d1b54 /lib/coderay/scanners/ruby | |
parent | 90f70ee61e87e137aa192c5db97c382e1ec7d24b (diff) | |
download | coderay-d6fe4e777a4f543c8828dbf77e955ab38e6c2803.tar.gz |
#309 Improved highlighting of Ruby inside diffs
Diffstat (limited to 'lib/coderay/scanners/ruby')
-rw-r--r-- | lib/coderay/scanners/ruby/string_state.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/scanners/ruby/string_state.rb b/lib/coderay/scanners/ruby/string_state.rb index 14127c6..2f398d1 100644 --- a/lib/coderay/scanners/ruby/string_state.rb +++ b/lib/coderay/scanners/ruby/string_state.rb @@ -55,7 +55,7 @@ module Scanners def heredoc_pattern delim, interpreted, indented # delim = delim.dup # workaround for old Ruby delim_pattern = Regexp.escape(delim) - delim_pattern = / \n #{ '(?>[ \t]*)' if indented } #{ Regexp.new delim_pattern } $ /x + delim_pattern = / (?:\A|\n) #{ '(?>[ \t]*)' if indented } #{ Regexp.new delim_pattern } $ /x if interpreted / (?= #{delim_pattern}() | \\ | \# [{$@] ) /mx # $1 set == end of heredoc else |