mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
mkd comments are not quite sgml comments
This commit is contained in:
@@ -178,6 +178,7 @@ foreach $file (keys %file_types) {
|
|||||||
$shell_comment = 0;
|
$shell_comment = 0;
|
||||||
$m4_comment = 0;
|
$m4_comment = 0;
|
||||||
$sgml_comment = 0;
|
$sgml_comment = 0;
|
||||||
|
$mkd_comment = 0;
|
||||||
$zone_comment = 0;
|
$zone_comment = 0;
|
||||||
$man_comment = 0;
|
$man_comment = 0;
|
||||||
$python_comment = 0;
|
$python_comment = 0;
|
||||||
@@ -212,10 +213,10 @@ foreach $file (keys %file_types) {
|
|||||||
$prefix = " - ";
|
$prefix = " - ";
|
||||||
$end_comment = "-->\n";
|
$end_comment = "-->\n";
|
||||||
} elsif ($type eq "MKD") {
|
} elsif ($type eq "MKD") {
|
||||||
$sgml_comment = 1;
|
$mkd_comment = 1;
|
||||||
$start_comment = "<!---\n";
|
$start_comment = "<!---\n";
|
||||||
$prefix = " - ";
|
$prefix = " - ";
|
||||||
$end_comment = "--->\n";
|
$end_comment = "--->";
|
||||||
} elsif ($type eq "TXT") {
|
} elsif ($type eq "TXT") {
|
||||||
$prefix = "";
|
$prefix = "";
|
||||||
} else {
|
} else {
|
||||||
@@ -352,6 +353,29 @@ foreach $file (keys %file_types) {
|
|||||||
} else {
|
} else {
|
||||||
$first = $_;
|
$first = $_;
|
||||||
}
|
}
|
||||||
|
} elsif ($mkd_comment) {
|
||||||
|
$before_copyright = "";
|
||||||
|
if (/^<!/) {
|
||||||
|
$_ = <SOURCE> if $_ eq "<!---\n";
|
||||||
|
if ($_ !~ /[Cc]opyright/) {
|
||||||
|
print "$file: non-copyright comment\n";
|
||||||
|
close(SOURCE);
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
while (defined($_)) {
|
||||||
|
last if s/.*--->//;
|
||||||
|
$_ = <SOURCE>;
|
||||||
|
}
|
||||||
|
print "$file: unterminated comment\n"
|
||||||
|
unless defined($_);
|
||||||
|
if ($_ ne "\n") {
|
||||||
|
$first = $_;
|
||||||
|
} else {
|
||||||
|
$first = <SOURCE>;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$first = $_;
|
||||||
|
}
|
||||||
} elsif ($type eq "TXT") {
|
} elsif ($type eq "TXT") {
|
||||||
if ($_ =~ /[Cc]opyright/) {
|
if ($_ =~ /[Cc]opyright/) {
|
||||||
$/ = ""; # paragraph at a time
|
$/ = ""; # paragraph at a time
|
||||||
|
Reference in New Issue
Block a user