Jump to content

Topic on Extension talk:Variables

Creating a variable using vardefine adds to extra space in wiki

4
Summary by MGChecker

Beware of trailing whitespace.

84.46.53.105 (talkcontribs)

I am using the variable extension to us define some variables which I use later in my wiki. But adding these variables adds extra undesirable space at the top of the wiki. Am I missing something?

Cavila (talkcontribs)

Did you use newlines? Avoid them, wrap a div around your vardefines with display:none, or comment out each line break (I just tried to demonstrate this with pre-tags, but MediaWiki messed up my code).

84.46.52.252 (talkcontribs)

Cool! Thanks Cavila. display:none did the trick. :)

Dinoguy1000 (talkcontribs)

Just to add one more option, my preferred method is to place the closing braces for each vardefine on the same line as the opening braces for the next vardefine, e.g.

{{ #vardefine: var1 | foo
}}{{ #vardefine: var2 | bar
}}{{ #vardefine: ...