Eat trailing whitespace in zypper.conf (bnc#687530)
authorMichael Andres <ma@suse.de>
Wed, 30 Nov 2011 15:42:11 +0000 (16:42 +0100)
committerMichael Andres <ma@suse.de>
Wed, 30 Nov 2011 15:42:11 +0000 (16:42 +0100)
src/utils/zypper.aug

index 7ea74db..14d2415 100644 (file)
@@ -53,7 +53,7 @@ module ZYpper =
   let commented  = [ label "commented" . del /#[ \t]*/ "# " . store_to_eol? . eol ]
 
   (* Matches key=value, creates a new node out of key and stores the value *)
-  let kv = [ key kw_re . del /[ \t]*=[ \t]*/ " = " . store /[^# \t\n][^#\n]*/ ]
+  let kv = [ key kw_re . del /[ \t]*=[ \t]*/ " = " . store /[^ \t\n]([^\n]*[^ \t\n])?/ . del_opt_ws ""  ]
 
   (* An option consists of ## description, # commented lines and an optionall key=value pair. *)
   let option = [ seq "option" . description* . commented* . del_opt_ws "" . kv? . del_str "\n" ]