Mathew Robertson wrote:
Hi Sam,

I was looking through H::T when I noticed that it splits the incoming template using:

split ( /(?<=)/ , $template)

This regex ends up splitting on every '<'.

I have modified my version to use:

split( m!(?=<(?:\!--\s*)?/?[Tt][Mm][Pp][Ll]_)! , $template)

which thus matches only on <TMPL_ and </TMPL_ tags.


Won't this break if you use the <!-- TMPL... --> constructs of putting the TMPL tags within HTML comments?



Pete









------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to