I have this weird thing with wiki syntax: Consider a template with  
"optional columns", like so:

{|
! Foo
{{#if: {{{bar|}}} | ! Bar}}
{{#if: {{{baz|}}} | ! Baz}}
|-
| {{{foo}}}
{{#if: {{{bar|}}} | {{!}} {{{bar}}}}}
{{#if: {{{baz|}}} | {{!}} {{{baz}}}}}
|}

Now, if I transclude that template and leave out {{{bar}}} and  
{{{baz}}}, I get this markup:

<table>
<tr>
<th> Foo
<p><br />
</p>
</th></tr>
<tr>
<td> {{{foo}}}
<p><br />
</p>
</td></tr></table>

This is clearly, then, caused by the newline between the canditional  
bar and conditional baz lines resolving to empty strings, making the  
foo cells in each row have paragraphs containing line breaks.  So how  
do I get rid of it without, say, putting both rows into one compact row?


_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to