current/utils prepare-configfile.pl,1.5,1.6

Fabian Keil <[email protected]> Mon, 29 Aug 2016 10:45:53 +0000
Newsgroups gmane.comp.web.privoxy.cvs
Message-ID <[email protected]>
Update of /cvsroot/ijbswa/current/utils
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28199/utils

Modified Files:
	prepare-configfile.pl 
Log Message:
utils/prepare-configfile.pl: Automatically unbreak the forward header line


Index: prepare-configfile.pl
===================================================================
RCS file: /cvsroot/ijbswa/current/utils/prepare-configfile.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** prepare-configfile.pl	5 Feb 2013 14:07:31 -0000	1.5
--- prepare-configfile.pl	29 Aug 2016 10:45:51 -0000	1.6
***************
*** 32,36 ****
          s/^1\. \@\@TITLE\@\@/     /i;
  
!         if (m/^(\d*\.){1,3}\s/) {
              # Remove the first digit as it's the
              # config file section in the User Manual.
--- 32,39 ----
          s/^1\. \@\@TITLE\@\@/     /i;
  
!         if ($hit_header) {
!             $header_len += length($_);
!             $_ = " " . $_;
!         } elsif (m/^(\d*\.){1,3}\s/) {
              # Remove the first digit as it's the
              # config file section in the User Manual.
***************
*** 51,55 ****
              s/^/#  /;
          }
!         if ($unfolding_enabled and m/(\s+#)\s*$/) {
              $unfold_mode = 1;
              chomp;
--- 54,59 ----
              s/^/#  /;
          }
!         if ($unfolding_enabled and
!             (m/(\s+#)\s*$/ or m/forward-socks5 and$/)) {
              $unfold_mode = 1;
              chomp;
***************
*** 73,77 ****
          print unless (/^\s*$/);
  
!         if ($hit_header) {
              # The previous line was a section
              # header so we better underline it.
--- 77,81 ----
          print unless (/^\s*$/);
  
!         if ($hit_header and !$unfold_mode) {
              # The previous line was a section
              # header so we better underline it.
***************
*** 79,82 ****
--- 83,87 ----
              print "#  " . "=" x $header_len . "\n";
              $hit_header = 0;
+             $header_len = 0;
          };
      }


------------------------------------------------------------------------------