+ # Fix quote markers to adhere to RFC 3676, this changes "> >" to ">> " (if
+ # the default $indent is used). The space after ">" is not mandatory by RFC
+ # but makes the result more readable.
+ if ($fixind) {
+ for ($x=0; $x<scalar(@$lines); $x++) {
+ if (!$vrb[$x] && index($$lines[$x], $indent)==0) {
+ # We match space at the beginning to prevent removal of spaces
+ # directly after the last quote mark.
+ $$lines[$x] =~ /^((\Q$indent\E| )*\Q$indent\E ?)(.*)$/;
+ my $tmp = $1;
+ my $len = length $1;
+ my $rest = $3; # if anything follows after the quote
+ $tmp =~ tr/ //d;
+ $tmp .= ' ' if $rest; # don't create trailing whitespace
+ substr($$lines[$x], 0, $len, $tmp);
+ }
+ }
+ }
+