Re: newlines in files
| From: | Andrei Zmievski | Date: | Thu, 25 Oct 2001 19:18:49 +0000 |
| Subject: | Re: newlines in files | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1727@lists.php.net to get a copy of this message | ||
On Thu, 25 Oct 2001, Monte Ohrt wrote:
> If your compiled template ends in a PHP function then you wouldn't have
> this problem, it would be eaten by PHP. So I suppose a workaround would
> be to put a dummy tag at the end of your template, like {$fooblah} :-)
> But if your template ends in plain text (as many templates do), you will
> get the newline introduced by text editors in your HTML code. Now Smarty
> ensures that the newline is removed in any event.
>
> Currently, when you do this:
>
> {include file="header.tpl"}blah{include file="footer.tpl"}
>
> If the contents of header.tpl ended in plain text, you would get a
> newline right before "blah". Now after this fix, it will run everything
> together, as you would expect a template to do.
Except that you still don't get 1-to-1 correspondence between your
template and output, since you have to insert an extra newline if you
want to keep the previous one.
-Andrei
* Proximity bug: when the program crashes in front of important visitors. *