Re: [SMARTY-DEV] nested comments

From: Date: Thu, 11 Dec 2003 17:05:40 +0000
Subject: Re: [SMARTY-DEV] nested comments
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1972@lists.php.net to get a copy of this message
--- Monte Ohrt <monte@ispi.net> wrote: > We could introduce a new commenting syntax for commenting large > blocks of code, including normal comments. I think the syntax would > most intuitively be {** **}. [snip] > This would imply that you can't nest {** **} tags, but you could have > several sets of them in one template. Why not leave comments to do what they should do--comment? Is using {if 0} really so hard? Simply insert them formatted for easy retrieval or tag them with markers if need be. These are meant as *temporary* signals for debugging purposes, so it is likely that the tester should remember where she placed the start/ends anyhow. Most decent editors allow bookmarks for easy jumping around a file. I can't see the problem. > This is untested, but should be possible. It might impact things like > line numbering for error messages. Comments have always been a > stickler in the tokenizer. So why add more commenting problems, when it is not a commenting issue? Users who find the {if 0} approach unworkable should probably just create a custom block function (I suggest naming it something like NOP) that does nothing, returns nothing. Blocks DO nest, DO NOT mess up line numbering and importantly, introduce no new syntax. Sorry if I'm coming off too strong here, I mean to disrespect to anyone, I'm just rushed :) xo boots __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/

« previous php.smarty.dev (#1972) next »