Support empty lines in vc conversion tool
Change-Id: Ideb01fd9fbcf5cdc4ae0f5e7dcc3eea3d376017c
diff --git a/list2vc.pl b/list2vc.pl
index cc02746..c632ec7 100755
--- a/list2vc.pl
+++ b/list2vc.pl
@@ -1,4 +1,8 @@
#!/usr/bin/env perl
+
+
+
+package main;
use strict;
use warnings;
@@ -47,6 +51,13 @@
my $line = readline($fh);
chomp $line;
+
+ # Skip empty lines
+ if (!$line || length($line) == 0 || $line =~ /^[\s\t\n]*$/) {
+ # empty
+ next;
+ };
+
# Get text sigles
if ($line =~ m!^([^\/]+\/){2}[^\/]+$!) {
push @{$data{text}}, $line;
diff --git a/t/data/list1.txt b/t/data/list1.txt
index 001f85c..bc22c1c 100644
--- a/t/data/list1.txt
+++ b/t/data/list1.txt
@@ -1,6 +1,7 @@
A02
A01/B02/c04
A03
+
B04/X02
B04/X03
A01/B02/c05