From 0a46bb2c490a4a58a231f1557ed975d40dff9183 Mon Sep 17 00:00:00 2001 From: luke Date: Thu, 26 Apr 2007 19:09:24 +0000 Subject: Fixing #603 -- I had to add a special case for escaped carriage returns. I am not entirely sure this is the right solution, but so be it. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2418 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/parser/scope.rb | 2 ++ test/language/scope.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index 02192c572..25a6551af 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -604,6 +604,8 @@ class Puppet::Parser::Scope end elsif ss.scan(/^\$/) out << '$' + elsif ss.scan(/^\\\n/) # an escaped carriage return + next else tmp = ss.scan(/[^\\$]+/) # Puppet.debug("Got other: pos:%d; m:%s" % [ss.pos, tmp]) diff --git a/test/language/scope.rb b/test/language/scope.rb index c58719e79..610375f0d 100755 --- a/test/language/scope.rb +++ b/test/language/scope.rb @@ -288,6 +288,7 @@ class TestScope < Test::Unit::TestCase '$test string' => "value string", 'a testing $' => "a testing $", 'a testing \$' => "a testing $", + "an escaped \\\n carriage return" => "an escaped carriage return", '\$' => "$", '\s' => "\s", '\t' => "\t", -- cgit