r3 - 13 Feb 2006 - 12:37:53 - CrawfordCurrieYou are here: TWiki >  Codev Web > TmplDefStripsLeadingAndTrailingSpaces
Tags:
, create new tag
%TMPL:DEF defined templates do not instantiate as written. This is because the template reading code strips leading and trailing whitespace. 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
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 whitespace.

-- CrawfordCurrie - 14 Oct 2004

Moved to Bugs:Item1640. Please comment there.

 
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo