Re: Re[2]: [SMARTY] suggestion: don't add any CRs in compiled template

From: Date: Wed, 24 Apr 2002 13:22:56 +0000
Subject: Re: Re[2]: [SMARTY] suggestion: don't add any CRs in compiled template
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3862@lists.php.net to get a copy of this message
On Wed, 24 Apr 2002, Daniil Kaltchenko wrote: > Hi, > > AZ> On Tue, 23 Apr 2002, Thies C. Arntzen wrote: > >> it would be rather cool if smarty would not add any > >> "new-lines" to the compiled template. that way warnings and > >> errors generated by PHP would be way eaysier to spot in the > >> smarty template. > >> am i missing something? > AZ> I don't quite understand what you mean. "Add new-lines"? > > Andrei, after each {$var} in template, during compilation Smarty > insert in compiled template "\n" - New line. It is not very good, > because it can distort original tpl files (and design). In HTML, New > line can corrupt representation of this HTML. Can you fix it? > > Greeting, > Daniil It has to be this way because PHP "eats" newslines that occur immediately after a PHP tag. Don't ask me why it has that behavior. -Andrei "Dealing with failure is easy: Work hard to improve. Success is also easy to handle: You've solved the wrong problem. Work hard to improve." - Alan Perlis

« previous php.smarty.general (#3862) next »