$comment_start = '\s*%';
} elsif (ref $self eq 'SL::Template::HTML') {
$comment_start = '\s*<!--';
- $comment_end = '>\s*';
+ $comment_end = '(?:--)?>\s*';
} else {
$comment_start = '\s*\#';
}
while ($i < $num_lines) {
my $line = $lines->[$i];
- if ($line !~ m/^${comment_start}\s*config\s*:(.*)${comment_end}$/i) {
+ if ($line !~ m/^${comment_start}\s*config\s*:(.*?)${comment_end}$/i) {
$i++;
next;
}