Template:Trim/doc

From Biowikifarm Metawiki
< Template:Trim
Revision as of 23:08, 22 September 2008 by MarcBrugman (Talk | contribs) (New page: {{Documentation/subpage}} ==Usage== This template trims whitespace and extra newlines from the start and end of the parameter. Example: <pre><nowiki> 000{{Trim|1= zzz zzz zzz zzz }}0...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This is a documentation subpage for Template:Trim (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

Usage

This template trims whitespace and extra newlines from the start and end of the parameter. Example:

000{{Trim|1=

zzz zzz

zzz zzz  

}}000

gives: "000zzz zzz

zzz zzz000"

Warning

Although it is possible to use the template without the "1=", such usage will break whenever an equal sign occurs in the input (the part before the "=" will then be consider a parameter name). Using the template with a named (here first number) parameter prevents this.