Template:Syntaxhighlight

From Multi Theft Auto: Wiki
Revision as of 19:49, 28 March 2024 by Tracer (talk | contribs) (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)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


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!')