Name

strip_white — strip whitespace from the top of Interchange-served HTML pages

VALUE

0 | 1

DEFAULT

0

DESCRIPTION

This pragma strips whitespace from the top of HTML pages output by Interchange. Such whitespace usually comes from Interchange tags which get processed and leave empty space behind them. The purpose of this pragma is to make View source option in your web browser a more tolerable experience.

EXAMPLES

Example: Strip whitespace from the top of Interchange-served pages

Simply add the following to catalog.cfg

Pragma strip_white

NOTES

AVAILABILITY

strip_white is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0 (2/2 contexts shown):

Source: lib/Vend/Page.pm
Line 272 (context shows lines 262-276 in output_cat():262)

sub output_cat {
my ($tag) = @_;
my $ary;
return '' unless $ary = $Vend::OutPtr{lc $tag};
my $out = '';
for(@$ary) {
  next unless $Vend::Output[$_];
  $out .= ${$Vend::Output[$_]};
  undef $Vend::Output[$_];
}
$out =~ s/^\s+// if $::Pragma->{strip_white};
return $out;
}

sub output_ary {

Source: lib/Vend/Server.pm
Line 636 (context shows lines 626-640 in respond():612)

      ? "$1"
      : "200 OK";
}

if($CGI::redirect_status and ! $Vend::StatusLine) {
  $status = "200 OK";
  $Vend::StatusLine = "Status: 200 OK\nContent-Type: text/html";
}

$$body =~ s/^\s+//
  if ! $Vend::ResponseMade and $::Pragma->{strip_white};

$Vend::StatusLine =~ s/\s*$/\r\n/ if $Vend::StatusLine;

# NOTE: if we're supporting arbitrary encodings here in the

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!