Pergunta

I am creating a complex template and I need new lines to break up the code so I can see it better. How do I break up a template without having it render new lines when the template is called?

Here's a snippet of code

{{#if: {{{value|}}} |'''Market value: '''{{{value}}}
}}

{{#if: {{{damage|}}} |'''Damage: '''{{{damage}}}
}}

{{#if: {{{identified|}}} |'''Description (sufficiently identified): '''"{{{identified}}}"
}}

{{#if: {{{unidentified|}}} |'''Description (insufficiently identified): '''"{{{unidentified}}}"
}}

{{#if: {{{weight|}}} |'''Weight: '''{{{weight}}} lb
}}

{{#if: {{{durability|}}} |'''Durability: '''{{{durability}}}
}}

{{#if: {{{quality|}}} |'''Quality rank: '''{{{quality}}}
}}

{{#if: {{{requirements|}}} |'''Requirements: '''{{{requirements}}}
}}

{{#if: {{{materials|}}} |'''Materials: '''{{{materials}}}
}}

{{#if: {{{materials|}}} |'''Materials: '''{{{materials}}}
}}

Foi útil?

Solução

You can use HTML style comments in MediaWiki templates:

}}<!--

-->{{#if: {{{durability|}}} |'''Durability: '''{{{durability}}}
}}<!--

-->{{#if: {{{quality|}}} |'''Quality rank: '''{{{quality}}}
}}<!--

-->
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top