Template:Code: Difference between revisions
Content added Content deleted
(+TR) |
(If it's already explaining its documentation, those comment sources are not needed.) |
||
Line 2: | Line 2: | ||
{{doc}} |
{{doc}} |
||
[[Category:Formatting templates]] |
[[Category:Formatting templates]] |
||
[[tr:Şablon:Kod]]</noinclude> |
[[tr:Şablon:Kod]]</noinclude> |
||
Base template copied over from https://en.wikipedia.org/wiki/Template:Code -> |
|||
{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|}}}|id={{{id|}}}|style={{{style|}}}|inline=1}} |
|||
https://www.mediawiki.org/wiki/Template:Code -> |
|||
then: |
|||
<code class="{{{class|code}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}}>{{#tag:syntaxhighlight|{{{1|}}}|lang="{{{lang|{{{2|text}}}}}}"|enclose="none"}}</code> |
|||
now: |
|||
{{#if:{{{inline|}}}|<code {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}}>{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang="{{{lang|{{{2|text}}}}}}"|enclose="none"}}</code>|{{#tag:syntaxhighlight |
|||
|{{{1|}}} |
|||
|lang={{{2|bash}}} |
|||
}}}} |
|||
--> |