9,928
editsno edit summary
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
<pre>{{trim | {{{1}}} }}</pre> | <pre>{{trim | {{{1}}} }}</pre> | ||
Additionally, this can be used for blocks of code in a page's source that would only produce empty lines, such as a series of <code><nowiki>{{# | Additionally, this can be used for blocks of code in a page's source that would only produce empty lines, such as a series of <code><nowiki>{{#lvardef:}}</nowiki></code> declarations. By using this template, you can make such a block of code emit no output at all: | ||
<pre> | <pre> | ||
{{trim | | {{trim | | ||
{{# | {{#lvardef: x | blah }} | ||
{{# | {{#lvardef: y | blub }} | ||
}}''The {{# | }}''The {{#lvar:x}} did {{#lvar:y}}.'' | ||
</pre> | </pre> | ||
Line 18: | Line 18: | ||
{{trim | | {{trim | | ||
{{# | {{#lvardef: x | blah }} | ||
{{# | {{#lvardef: y | blub }} | ||
}}''The {{# | }}''The {{#lvar:x}} did {{#lvar:y}}.'' | ||
If you absolutely want line breaks after the <code><nowiki>}}</nowiki></code> at the end, without introducing blank lines in the output, then there's no way around using a div. This is sub-optimal because it will produce some output in the HTML that's ultimately sent to the browser, even if invisible: | If you absolutely want line breaks after the <code><nowiki>}}</nowiki></code> at the end, without introducing blank lines in the output, then there's no way around using a div. This is sub-optimal because it will produce some output in the HTML that's ultimately sent to the browser, even if invisible: | ||
Line 26: | Line 26: | ||
<pre> | <pre> | ||
<div>{{trim | | <div>{{trim | | ||
{{# | {{#lvardef: x | blah }} | ||
{{# | {{#lvardef: y | blub }} | ||
}}</div> | }}</div> | ||
''The {{# | ''The {{#lvar:x}} did {{#lvar:y}}.'' | ||
</pre> | </pre> | ||
Line 36: | Line 36: | ||
<div>{{trim | | <div>{{trim | | ||
{{# | {{#lvardef: x | blah }} | ||
{{# | {{#lvardef: y | blub }} | ||
}}</div> | }}</div> | ||
''The {{# | ''The {{#lvar:x}} did {{#lvar:y}}.'' | ||
</noinclude> | </noinclude> |