From 56dd27586e28ef80850e83601f26e01a95a7110b Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sat, 21 Jan 2017 02:34:49 +0100 Subject: Fix .info parsing - again. This fixes #55 --- SBO-Lib/lib/SBO/Lib/Info.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'SBO-Lib/lib/SBO/Lib/Info.pm') diff --git a/SBO-Lib/lib/SBO/Lib/Info.pm b/SBO-Lib/lib/SBO/Lib/Info.pm index f117be6..03e740a 100644 --- a/SBO-Lib/lib/SBO/Lib/Info.pm +++ b/SBO-Lib/lib/SBO/Lib/Info.pm @@ -216,9 +216,10 @@ sub parse_info { my $pos = 0; my %ret; - while ($info_str =~ /\G([A-Za-z0-9_]+)="([^"]*)"\s*\n/g) { - my $key = $1; - my @val = split " ", $2; + while ($info_str =~ /\G([A-Za-z0-9_]+)="([^"]*)"\s*(?:\n|\z)/g) { + my ($key, $val) = ($1, $2); + $val =~ s/\\[ \t]*$/ /mg; + my @val = split " ", $val; @val = '' unless @val; $ret{$key} = \@val; $pos = pos($info_str); -- cgit v1.2.3