Forum:Space at end of if statement

In w:c:ChristianMusic:Template:Box Set Link Builder, please examine the last sample (at the bottom of the page). Could someone explain how to get spaces in between "of" and "Volume"? The template includes. Notice the space just before the final closing braces. That space is apperantly being trimmed by #if:.

Is there a way to prevent that from happening? I do not want to put the space on the other side of those braces as it might be visible when the text it should be with is ommitted. I also do want to avoid resorting to &amp;nbsp; as that would cause odd formatting problems. Will (talk -- contribs) 20:06, 8 October 2006 (UTC) Use <nowiki&gt; tags to do that:

Dantman (Talk) 23:19, 8 October 2006 (UTC)


 * First, I did not know you could use nowiki to keep the #if from trimming the spaces. Second, what is to prevent the way you had it above from causing the  from failing to expand.  Shouldn't the nowiki tag be on the other side of the parameter?


 * Third, from what I can tell, w:c:User:StBacchus made a change. That change looks like it is having the desired effect, but instead of your nowiki solution, the change implemented was to put the space outside the #if:.  This could cause other problems with formatting and I am thinking of changing it back. Will (talk -- contribs) 04:34, 9 October 2006 (UTC)


 * Could also try or &emsp; . --Splarka (talk) 04:41, 9 October 2006 (UTC)

I specifically do not want &amp;nbsp;. I stated that above. I will not repeat this again. I have no idea what &amp;emsp; is. Will (talk -- contribs) 05:21, 9 October 2006 (UTC)


 * Um... &amp;emsp; is a breaking space. --Splarka (talk) 05:35, 9 October 2006 (UTC)

That helps. When I searched Meta, all I found was a list of page using that code. That did not help. I will try the &amp;emsp;. Thank you. Will (talk -- contribs) 23:57, 9 October 2006 (UTC)


 * &amp;emsp; made the spaces too wide. Even with just one space of any type in there, I got a double width space.  I am not see any problems with "&lt;nowiki> &lt;/nowiki>".


 * New problem. Why does the sample at the top of the page have so many italtic marks?  I am concerned that I may get unintended formatting as a result of that. Will (talk -- contribs) 00:07, 10 October 2006 (UTC)


 * Sorry... I made a quick mistake in the placement of the nowiki tag. This is what that section of code you are talking about looks like when you break it down into structure.

]] The first thing I'm going to note is that 7 of the sections are missing the then portion which may cause issues. These sections are marked with |---(|)---|.

I have marked the points in which the parser would track through the code with <--- and added a * on the line where we end up at. Since this line looks normal it is my beleif that this may be caused by impropper coding.

Dantman (Talk) 05:47, 10 October 2006 (UTC)


 * I am not following you. Are you talking about the problem with the space -- or the extra italics? Will (talk -- contribs) 15:06, 10 October 2006 (UTC)


 * I fixed the syntax but it didn't work. Now your code is just typed right. Dantman (Talk) 02:22, 12 October 2006 (UTC)

The only change I have found is that the parameter is now named. The old name was the design name. Why change it? There may not be any uses of this parameter in the samples, but it is refered to in the documentation at the bottom. It is also passed by   in case it is passed to. I could not find any other locations where your version of the parameter was referenced. So I am changing it back.

That change you made could be considered vandalism under the strictist definition. For now, I will overlook that. Will (talk -- contribs) 01:35, 13 October 2006 (UTC)

I don't remember changing a variable. All I remember is fixing the problem where you were missing then sections of if statements. And there are no missing then statements anymore. So I have a feeling that someone vandalized the page after I made the change.

Anyways. I looked through the thing. Aparently it has a dislike of having the sections stuck together the way it was. The only time it didn't come up with that glitch was when I tested a code similar to what I typed above where whitespace makes the structure. So it apears that the extra quote marks are a side-effect of not seperating sections with whitespace. I've went through the code and added a space inside of the if sections ( "" is now "" . Since I have only added whitespace inside of the start and end of if sections those spaces will be trimmed and the output will remain the same (If something glitched, tell me and I'll try and find what spot I messed up on.) But the good news is that the quotemarks are gone. Dantman (Talk) 06:07, 13 October 2006 (UTC)

Nevermind. I see what happened. A finger must have slipped up when I was finding the sections to fix and deleted something, I must have tryed to type it back but forgot a capitalization. Sorry. Dantman (Talk) 06:12, 13 October 2006 (UTC)


 * The version of the template at the top (with no parameters passed) does show spaces beside the link text and does not italicize the link text. Granted the template will never be called like this, but I still would have expected the spaces to be gone and the link text to be italicized. Will (talk -- contribs) 18:55, 13 October 2006 (UTC)