Template:Code/Doc: Difference between revisions
Created page with "Use this template to show code that has syntax highlighting. {{code|lang=mediawiki|Some code with syntax highlighting}} === Usage === Include this template, specifying the language and code that should be displayed: {{code|lang=mediawiki|<nowiki>{{code|lang=mediawiki|Some code with syntax highlighting}}</nowiki>}}" |
No edit summary |
||
Line 7: | Line 7: | ||
Include this template, specifying the language and code that should be displayed: | Include this template, specifying the language and code that should be displayed: | ||
{{code|lang=mediawiki|<nowiki>{{code|lang=mediawiki|Some code with [[:Wikipedia:Syntax highlighting|syntax highlighting]]}}</nowiki>}} | {{code|lang=mediawiki|line=no|<nowiki>{{code|lang=mediawiki|Some code with [[:Wikipedia:Syntax highlighting|syntax highlighting]]}}</nowiki>}} | ||
You can disable the ''"Copy"'' button by setting the parameter to 'no': | |||
{{code|lang=mediawiki|line=no|<nowiki>{{code|lang=mediawiki|copy=no|Some code}}</nowiki>}} | |||
This would result in: | |||
{{code|lang=mediawiki|copy=no|Some code}} | |||
You can disable line numbers by setting the <code>line</code> parameter to 'no': | |||
{{code|lang=mediawiki|line=no|<nowiki>{{code|lang=mediawiki|line=no|Some code}}</nowiki>}} | |||
This would result in: | |||
{{code|lang=mediawiki|line=no|Some code}} |