Re: newline after object call.
"messju mohr" <[email protected]> Mon, 23 May 2005 14:00:04 +0200
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <20050523120004.GG5830@dune> |
On Thu, May 05, 2005 at 03:04:11PM +0200, Arpad Borsos wrote:
> Hi.
> Is there any reason why there is a newline after object calls?
> I have something similar in my code:
>
> {admin->checkright right="templates"}
<- here you have a newline (ater the closing '}'), why not remove this?
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> the problem is that when the code is parsed a newline is inserted after
> the object call which results in a xhtml error.
> I can work around the problem by using assign. But that makes no sense
> since my admin::checkright function does not return anything.
> Looks like this behavior is hardcoded in the compilers
> _compile_registered_object_tag function. But i cant see any reason for this.
yes, newline handling in Smarty is unreasonably complex. but i doubt
this will be changed ever in Smarty 2.6.x, due to compatibility
reasons.
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php