• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

%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,

| My | Table |

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 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


Merge to TWikiRelease04x00


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.


4.1.0 released


Summary Don't strip newlines from the front of TMPL:DEFs
ReportedBy TWiki:Main.CrawfordCurrie
Codebase 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, ~twiki4
SVN Range Thu, 02 Feb 2006 build 8675
AppliesTo Engine

Priority Enhancement
CurrentState Closed

Checkins 11017 8926
TargetRelease minor
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r11 - 2007-01-16 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback