Skip to content

Commit

Permalink
(#152) Fix crash on string with \\ and variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Dalén committed Oct 18, 2012
1 parent 91b786d commit db6cde3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet-lint/lexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def tokenise(code)
i += str_content.size + 1

elsif chunk.match(/\A"/)
str_contents = StringScanner.new(code[i+1..-1]).scan_until(/(\A|\\\\|[^\\])"/m)
str_contents = StringScanner.new(code[i+1..-1]).scan_until(/(\A|[^\\])(\\\\)*"/m)
_ = code[0..i].split("\n")
interpolate_string(str_contents, _.count, _.last.length)
i += str_contents.size + 1
Expand Down

0 comments on commit db6cde3

Please sign in to comment.