Re: [htmltmpl] Question about syntax
Brought to you by:
samtregar
From: Pete P. <pet...@cy...> - 2004-08-11 19:26:26
|
Chisel Wright wrote: > On Wed, Aug 11, 2004 at 08:26:39AM -0500, Brad Cathey wrote: > >> >><!-- tmpl_var name=somename --> >> > Initially I was a strict comments-only syntax user. Over the years I've > changed my view a little. > > I now use comments-only syntax everywhere *except* inside tag > attributes, e.g.: > > <img src="<TMPL_VAR myimage>"> > > as opposed to > > <img src="<!-- TMPL_VAR NAME="myimage" -->"> > > which screws up syntax higlighting to the Nth degree. > > I could probably use: > > <img src="<!-- TMPL_VAR myimage -->"> > or > <img src="<!-- TMPL_VAR NAME=myimage -->"> > > But I figure that when I'm inside an attribute I need to remove as much > 'fluff' as possible to keep it legible. > > Using the comment syntax elsewhere means that it shows up clearly in > vim, rather than just blending in (and should pass any HTML validation > too) I'm in the <!-- comment --> camp as well. I use jEdit and created an edit mode for HTML::Template so that it sees comments with 'tmpl_' and applies a style to it to make in stand out. I can also run templates through Tidy or a validator if necessary. (It's not, I write perfekt coad evereytime! ;) Pete |