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.8.0-5.7.0 (cvs-head)

SOURCE

Interchange 5.7.0 (2/2 contexts shown):

Source: lib/Vend/Page.pm (rev. 2.26 from Wed Apr 16 00:01:13 2008)
Line 247 (context shows lines 237-251 in output_cat():237)

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 (rev. 2.93 from Thu Sep 18 00:01:21 2008)
Line 559 (context shows lines 549-563 in respond():539)

      ? "$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;

if(! $s and $Vend::StatusLine) {

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!