Re: [Templates] pre/post chomp question....

[prev] [thread] [next] [Date index for 2004/12/13]

From: Dave Cross
Subject: Re: [Templates] pre/post chomp question....
Date: 16:52 on 13 Dec 2004
On Mon, Dec 13, 2004 at 11:48:40AM -0500, Sean T Allen wrote:
> if i have the following at the start of a template:

[ snip ]

> shouldnt this remove all whitespace and newlines proceeding the doctype 
> line?

Seems to work as expected using tpage:

$ cat temp.tt
[%- DEFAULT
  mc = 'WPJF1'
-%]
[%- IF mc == 'WPJF1' -%]
  [%- SET shipping = '4.95' -%]
[%- ELSIF mc == 'WPJF4' -%]
  [%- SET shipping = '2.95' -%]
[%- END -%]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
$ tpage temp.tt
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


Dave...

        -- 
          If you miss an opportunity to see him perform... you're a total asshole.
  David Cross rocks my world.
    -- Jack Black

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] pre/post chomp question....
Sean T Allen 16:48 on 13 Dec 2004

Re: [Templates] pre/post chomp question....
Dave Cross 16:52 on 13 Dec 2004

Re: [Templates] pre/post chomp question....
Darren Chamberlain 22:11 on 13 Dec 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52