Template:Hbc-hl

From KDE Community Wiki
Revision as of 02:21, 28 September 2023 by Ashark (talk | contribs) (Seems hack does not work for non-pre tag. Use [https://www.mediawiki.org/wiki/Help:Magic_words#Miscellaneous tags] template instead.)

Page Template:Hc-hl/styles.css has no content.

This page is a template, editing it will affect all the pages that make use of it, so users should be especially careful when editing it. For more details on how to use templates see "A Quick Guide to Templates"

Block code with header. With highlighted syntax.

Usage

  • 1 or lang: the language of code block, to apply highlighting
  • 2 or head: the code in the top pane
  • 3 or output: the code in the bottom pane
{{hc-hl|lang=python|script.py|
def quick_sort(arr):
	less = []}}
{{hc-hl|python|head=script.py|output=output=
def quick_sort(arr):
	less = []}}

See here for supported values for lang.

Example

Template:Hc-hl