Template:Syntaxhighlight: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly>{{#tag:syntaxhighlight|{{{1}}}|lang="{{#if:{{{2|}}}|{{{2}}}|c++}}"}}</includeonly> <noinclude> This template will add <code>syntaxhighlight</code> tag to the provided text. == Syntax == <syntaxhighlight lang="pcre"> {{Syntaxhighlight|text|lang}} </syntaxhighlight> === Required Arguments === * '''text:''' text you want to surround syntaxhighlight with. === Optional Arguments === * '''lang:''' codeblock language (e.g. c++, lua, python)...") |
(No difference)
|
Revision as of 19:49, 28 March 2024
This template will add syntaxhighlight
tag to the provided text.
Syntax
{{Syntaxhighlight|text|lang}}
Required Arguments
- text: text you want to surround syntaxhighlight with.
Optional Arguments
- lang: codeblock language (e.g. c++, lua, python)
Example
Click to collapse [-]
{{Syntaxhighlight|print('Hello, World!')|lua}}The above code will result in this block:
print('Hello, World!')