From: Alan T. DeKok Date: Mon, 27 Jan 2025 14:14:46 +0000 (-0500) Subject: print inline code for virtual servers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28f2b2dfdcf1625203ac4716f8e3ab0cc6f8cf55;p=thirdparty%2Ffreeradius-server.git print inline code for virtual servers --- diff --git a/scripts/asciidoc/conf2adoc b/scripts/asciidoc/conf2adoc index ea8b48c5b6d..958b31c94c7 100755 --- a/scripts/asciidoc/conf2adoc +++ b/scripts/asciidoc/conf2adoc @@ -47,6 +47,9 @@ sub process_file { my $input = shift; my $output_file = shift; my @code = (); + my $inline = $print_code; + + $inline = 1 if $input =~ /sites-available/ || $output_file =~ /sites-available/; if (!defined $output_file) { $output = STDOUT; @@ -116,7 +119,7 @@ sub process_file { } if ($raw != $was_raw) { - print $output "```\n" if ($print_code); + print $output "```\n" if ($inline); $was_raw = $raw; } @@ -189,7 +192,7 @@ sub process_file { $line =~ s,doc/antora/modules/([^/]+)/pages/(.*)/([^/]+).adoc,xref:reference:$1/$2/$3.adoc[$3],g; - if (!$print_code) { + if (!$inline) { if ($raw && $was_raw) { push @code, $line if ($opt_t); next; @@ -205,7 +208,7 @@ sub process_file { # # Terminate any trailing "raw" text. # - print $output "```\n" if ($print_code); + print $output "```\n" if ($inline); if ($opt_t) { print $output "\n";