Match a collection of flag characters, though only `!' is currently
recognized, and then set the flags based on what we see.
$comment = defined $comment ? $comment . "\n" . $_ : $_;
} else {
if ($item && $comment) { $item->comment($comment); }
- my ($indexp, $name, $c) =
- /^ (! \s+)? # index flag
+ my ($flags, $name, $c) =
+ /^ (?: ([!]+) \s+)? # flags
(\S+) \s* # filename
(\S | \S.*\S )? # start of the comment
\s*
$/x;
+ my $indexp = $flags =~ /!/;
$name = urldecode $name;
my $list;
$item = TrivGal::Item->new($name);