diff options
Diffstat (limited to 'lib/coderay/scanners/ruby/string_state.rb')
-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 |