Re: [SMARTY-DEV] strip problem again
| From: | Konstantin | Date: | Tue, 02 Sep 2003 09:14:26 +0000 |
| Subject: | Re: [SMARTY-DEV] strip problem again | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1840@lists.php.net to get a copy of this message | ||
> > If I understand well, now (outside of strip) there is
> > no extra newline after {include},{section},{/section},
> > etc. but there is extra newline after {$var} or custom
> > function.
> > It should be made consistent, I think. Or it should be
> > clearly stated in the documentation.
> the additional newline here is emitted by {textformat}
> not by the fact that it is a custom block-function.
Yes, you're right with block functions, I'm sorry.
But {include} should work the same as custom function, for
example, {mailto}. From designer's point of view {include}
is the same as any other custom function. Currently they
work differently. I suppose to add newline after {include}.
And I have not tested {include_php} and {insert}, but they
should work like {include}. Or alternatively remove extra
newline from custom functions.
This example.
Include:
{include file='test.html'}
Var:
{"text"}
Mailto:
{mailto address="me@domain.com"}
Assign:
{assign var='var' value='val'}
After.
> > I'd disallow nested strip, since it has no sense.
> hmm, what would be better: throwing an error or ignorig
> the inner strip(s) silently?
Ignoring, if it's simple to implement.
Konstantin A. Pelepelin