Forrmatting Help with Wiki

Hello, I don't think I am setting up two code examples properly... I currently use this for the format
Code:
code1={{CodeSample|
title=Code Samples|
description=Stuff|
code=
<syntaxhighlight>
//Example 1
</syntaxhighlight>|
}}|

code2={{CodeSample|
description=Stuff2|
code=
<syntaxhighlight>
//Example 2
</syntaxhighlight>|
}}|
This seems to work mostly fine except that for the second example it will add huge random spaces throughout the code example which can be viewed HERE. I am not sure why it does this and haven't been able to figure out a solution. Switching which one comes first will make that one look normal and the second one distorted. The bigger the second example is the worse it looks.

I asked Bale about it and he said, "I don't know why that didn't work. I fixed it, but don't know why my solution was necessary or why it worked. I just copied something from this page."

If you have any idea what I am doing wrong, help would be greatly appreciated.
 
Last edited:
I figured it out. Had to remove the "|" at the end of
Code:
//Example 1
</syntaxhighlight>|
}}|"

so it is now

Code:
//Example 1
</syntaxhighlight>|
}}"
 

Bale

Minion
Not quite, now you've got a stranged "code2=" as text on that page. Remove it to make things look right.
 
Yeah I just noticed that. I thought we were suppose to have codeX=code2={{CodeSample| but I guess not? Wiki formatting is so confusing at times....

Edit: I am starting to think this isn't the way to fix it either. It seems to have made function2= break as well.
 
Last edited:
Top