Thread:Happypal/@comment-6003396-20130515063311/@comment-667748-20130515081638

Yeah, it's a special case of "named parameter" vs "un-named" parameter. For reasons that are unclear to me, named parameters are stripped when passed, but un-named parameters aren't. So for example, if you have:

And the template code is: "" "" The the actual produced wiki text will be: "hello" " hello "

As you can see, not only does "1" have trailing spaces, it even has a trailing linefeed. Often, this is not a problem, as (single) linefeeds are parsed as spaces, but it can create problems when you want to tie strings, or if you happen to have more than 1 linefeed in a row.

There are 2 workarounds: The first is the Trim template. Works like a charm, but has a tendency to bloat ur code.

The second is an internal template that just forwards every un-named parameter as unnamed, eg:

Template:T

And then

Noticed that when you write "1 = somùething", then that stops being an un-named parameter (its name is "1").

This approach is more convenient, as it avoids litering the code with "Trim". However, it has a minor inconvenience: Inside "/internal", you will not be able to distinguish an empty field, from a field with an empty string. Mix and match as needed I guess.