From 670df2f2773502679f6548a8298296f672d068a3 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Wed, 29 Jun 2016 10:43:01 +0200 Subject: [PATCH] Fixed bug that parsed description fields incorrectly Example: Description-en: 389 Directory Server suite - server Based on the Lightweight Directory Access Protocol (LDAP), the 389 Directory Server is designed to manage large directories of users and resources robustly and scalably. . Its key features include: * four-way multi-master replication; * great scalability; * extensive documentation; * Active Directory user and group synchronization; * secure authentication and transport; * support for LDAPv3; * graphical management console; * on-line, zero downtime update of schema, configuration, and in-tree Access Control Information. The "Its key features include:" was mistaken as a key. --- lib/deb_importer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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=''