Content:MirLua/Example: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
(Undo revision 21441 by Goraf (talk))
Tags: Undo Reverted
(Undo revision 41903 by Dart Raiden (talk))
Tags: Undo Reverted
Line 1: Line 1:
{{#tag: syntaxhighlight
<code>
|{{{code|}}}
{{{code|}}}
|lang="lua"
</code><includeonly>[[Category:MirLua examples|{{SUBPAGENAME}}]]</includeonly><noinclude>
|line=line
}}<includeonly>[[Category:MirLua examples|{{SUBPAGENAME}}]]</includeonly><noinclude>
{{Documentation
{{Documentation
|link box = off
|link box = off
|content =  
|content =  
{{Todo|Make a parameter to disable line numeration for examples of 1–3 lines (if possible).}}
{{Todo|Make a parameter to disable line numeration for examples of 1–3 lines (if possible).}}
{{Todo|Revert commits when syntaxhighlight start working.}}
== Usage ==
== Usage ==
If the code to be highlighted contains pipes "<nowiki>|</nowiki>", they should be replaced with {{Tl|!}} to be displayed correctly:
If the code to be highlighted contains pipes "<nowiki>|</nowiki>", they should be replaced with {{Tl|!}} to be displayed correctly:

Revision as of 00:48, 24 September 2022

Documentation
Todo: Make a parameter to disable line numeration for examples of 1–3 lines (if possible).
Todo: Revert commits when syntaxhighlight start working.

Usage

If the code to be highlighted contains pipes "|", they should be replaced with {{!}} to be displayed correctly:

{{Content:MirLua/Example|code=local hk = hotkeys.MakeHotkey(HOTKEYF_SHIFT {{!}} HOTKEYF_ALT, 'A')}}

will produce local hk = hotkeys.MakeHotkey(HOTKEYF_SHIFT | HOTKEYF_ALT, 'A')