diff --git a/lib/deb_importer.rb b/lib/deb_importer.rb index f948222..81be7e2 100644 --- a/lib/deb_importer.rb +++ b/lib/deb_importer.rb @@ -101,10 +101,10 @@ module DebImporter name=value='' data.each_line do |line| case line - when /^(.+?): (.+)/ # "Key: Value" + when /^(\S+?): (.+)/ # "Key: Value" fields[name.to_sym]=value unless value.empty? name,value=$1,$2 - when /^(.+?):$/ # "Key:" (start of multi-line entry without value in line) + when /^(\S+?):$/ # "Key:" (start of multi-line entry without value in line) fields[name.to_sym]=value unless value.empty? name=$1 value=''