Skip to content

Commit

Permalink
Explicitly support CONFIG_START/END
Browse files Browse the repository at this point in the history
  • Loading branch information
kinkie committed Feb 9, 2025
1 parent bfaeca1 commit 1f1c2e4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/www/build-cfg-help.pl
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ ()
$data->{'aliases'} = \@aliases;
$data->{'default'} = "";
$data->{'default_doc'} = "";
$data->{'doc'} = "";
$data->{'default_if_none'} = "";

print "DEBUG: line $.: new option: $name\n" if $verbose;
Expand Down Expand Up @@ -345,6 +346,16 @@ ()
$option{$othername}{'doc'} = $data->{'doc'};
}
undef @chained;
} elsif ($_ =~ /^CONFIG_START$/) {
$state = "config";
next;
} elsif ($_ =~ /^CONFIG_END$/) {
$state = "";
my $othername;
foreach $othername (sort @chained) {
$option{$othername}{'doc'} .= $data->{'doc'};
}
undef @chained;
} elsif ($_ =~ /^DOC_NONE$/) {
update_defaults;
push(@chained, $name);
Expand All @@ -360,6 +371,9 @@ ()
$data->{"config"} .= $_ . "\n";
} elsif ($state eq "doc") {
$data->{"doc"} .= $_ . "\n";
} elsif ($state eq "config") {
$data->{"doc"} .= " " if $format eq "markdown";
$data->{"doc"} .= $_ . "\n";
} elsif ($_ =~ /^COMMENT_START$/) {
end_options;
$state = "comment";
Expand Down

0 comments on commit 1f1c2e4

Please sign in to comment.