Template:Code: Difference between revisions

m
no edit summary
(Created page with "<code class={{{class|code}}} style={{{style|}}}>{{#tag:syntaxhighlight|{{{1|}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|code}}}|id={{{id|}}}|style={{{style|}}}|enclose="no...")
 
imported>FrozenPlum
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1:
<onlyinclude><includeonly><code class={{{class|code}}} style={{{style|}}}>{{#tag:syntaxhighlight|{{{1|}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|code}}}|id={{{id|}}}|style={{{style|}}}|enclose="none"}}</code><noinclude/includeonly>{{doc}}[[Category:Formatting templates]]</noincludeonlyinclude><!--
{{Documentation}}
 
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}}}
}}}}
-->
Anonymous user