Re: [htmltmpl] H::T chunking of templates
Brought to you by:
samtregar
From: Pete P. <pet...@cy...> - 2004-03-04 21:20:44
|
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 |