Incorrect newline counters

Dmitry Koteroff <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
Hello.

Smarty do not preserve line numbers while compiling the template.
When an error occurs, PHP shows line number in compiled file, and
it does not correspond line number in the source template.

Example. If I have the following template:

1 {t_block name="Title"}...{/t_block}
2 {t_block name="Author"}...{/t_block}
3 {t_block name="Text"}
4 {strip}
5 ss
6 ddd
7 {/strip}
8 {$a}

and  $a  is undefined, I get notice not in line 8, but in other.
Resulting template contains:
a) superfluous  \n's  - in the headder comments /* compiled from
   ...*/, and after plugins require_once's;
b) insufficient spaces - {strip} processed incorrectly, it glues
   its body, replacing \n by '', but not by <?php\n?>

What do you thing about all that? If I write the patch which will
correct line numbers, will you include it in production version?
   
-- 
Best regards,
  Dmitry Koteroff.

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.