%TMPL:DEF defined templates do not instantiate as written. This is because the template reading code strips leading and trailing newlines. This is a major PITA (and the major source of bugs in the
CommentPlugin).
For example,
%TMPL:DEF{"mytable"}%
| My | Table |
%TMPL:END%
This is %TMPL:P{"mytable"}% my table
instantantiates as
This is | My | Table | my table
and not the more intuitive
This is
my table
I understand why it was coded that way, I think (because HTML doesn't care about spaces) but the implementation is counter-intuitive and a source of confusion.
Proposal: stop %TMPL:DEF from stripping leading and trailing newlines.
--
CrawfordCurrie - 14 Oct 2004
Ah. Well, be careful how you word that proposal and requirement. We don't want
vertical white space translated into lots of <p/>
In fact I wonder why some some templates have so much gratuitious vertical white space?
--
AJA
On the contrary; we want templates do do
exactly what is written on the tin. I don't want my templates pre-munged, thank you - there are cases where I
want that leading newline.
Also removed redundant conversion of spaces to tabs.
SVN 8031
CC
Merge to
TWikiRelease04x00
CC
This is a spec change. Did you evaluate the impact on this change?
Of course. I asked for feedback on this several months ago, and received much.
I am concerned that this will break existing skins.
Yes, it will, except the skins we ship which are already fixed.
--
PTh
PatternSkin has been changed (a few months ago) to cope with this change.
AC
4.1.0 released
KJL