\n";
return $quarcount;
}
# is_table_comment(line, [force-prefix])
# Returns the comment text if a line contains a comment, like # foo
sub is_table_comment
{
local ($line, $force) = @_;
if ($config{'prefix_cmts'} || $force) {
return $line =~ /^\s*#+\s*Webmin:\s*(.*)/ ? $1 : undef;
}
else {
return $line =~ /^\s*#+\s*(.*)/ ? $1 : undef;
}
}
# make_table_comment(comment, [force-tag])
# Returns an array of lines for a comment in a map file, like # foo
sub make_table_comment
{
local ($cmt, $force) = @_;
if (!$cmt) {
return ( );
}
elsif ($config{'prefix_cmts'} || $force) {
return ( "# Webmin: $cmt" );
}
else {
return ( "# $cmt" );
}
}
1;