diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-04-26 19:09:24 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-04-26 19:09:24 +0000 |
commit | 0a46bb2c490a4a58a231f1557ed975d40dff9183 (patch) | |
tree | ddcf8c81cddc959ef77c57efba8dedc947a4d4be | |
parent | 9a1a88ce82618de01c368cc9f8e34cb33d5f5ad2 (diff) | |
download | puppet-0a46bb2c490a4a58a231f1557ed975d40dff9183.tar.gz puppet-0a46bb2c490a4a58a231f1557ed975d40dff9183.tar.xz puppet-0a46bb2c490a4a58a231f1557ed975d40dff9183.zip |
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
-rw-r--r-- | lib/puppet/parser/scope.rb | 2 | ||||
-rwxr-xr-x | test/language/scope.rb | 1 |
2 files changed, 3 insertions, 0 deletions
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", |