Correctly record newlines for multi-line settings
authorurs <urs@nerd2nerd.org>
Tue, 12 Jun 2007 19:39:50 +0000 (19:39 +0000)
committerurs <urs@nerd2nerd.org>
Tue, 12 Jun 2007 19:39:50 +0000 (19:39 +0000)
Parse.pm

index 359ec1f..325c623 100644 (file)
--- a/Parse.pm
+++ b/Parse.pm
@@ -15,9 +15,10 @@ sub parse {
            $lastkey = $key;
         }
         elsif ($lastkey) {
+           chomp;
             s/^ //;
             s/^\.$//;
-            $parsed{$lastkey} .= $_;
+            $parsed{$lastkey} .= "\n$_";
         } else {
            die "Cannot parse $!";
        }