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

Suddenly TWiki generates <p />s in html pages corresponding to newlines in the template.

For instance in twiki.pattern.tmpl:

After each %TMPL:P{}% a <p /> is created.


That might have been introduced by change Item1640, Don't strip newlines from the front of TMPL:DEFs.

-- PTh

There are even gaps in attachment table rows. See for instance Item685.-- AC

my fault, fixed in SVN 8836


What are the new rules? I see that tables do have newlines with each tr or td. When not to use a newline?


The rule is that everything between TMPL:DEF and TMPL:END is taken into the definition. Previously it would skip any leading newlines, which was very confusing.

So, given:

previously blah would expand to Fred\n. Now it expands to \nFred\n, exactly as written.

You have to think about how TWiki works. In Cairo, if I did this:


Salix Orthomania%TMPL:END%
would expand to
XSalix OrthomaniaSalix OrthomaniaY
i.e. the leading (intended) <p /> would be eaten. Now it will expand to

Salix Orthomania

Salix OrthomaniaY
i.e. the leading P is retained. WYSIWYG.

It took me ages to figure out how to do CommentPlugin under the old rules, and I never quite got it right. This puts it right.


Summary TWiki generates <p />s when parsing templates
ReportedBy TWiki:Main.ArthurClemens

SVN Range Tue, 14 Feb 2006 build 8800
AppliesTo Engine

Priority Urgent
CurrentState Closed

TargetRelease major
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r8 - 2006-02-20 - CrawfordCurrie
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