Template:Code/Doc: Difference between revisions

DoggoBit (talk | contribs)
No edit summary
DoggoBit (talk | contribs)
No edit summary
Line 24: Line 24:


{{code|lang=mediawiki|line=no|Some code}}
{{code|lang=mediawiki|line=no|Some code}}
=== Template data ===
<templatedata>
{
  "description": "Display a block of code",
  "params": {
    "lang": {
      "label": "Programming language",
      "description": "The programming language used in the block of code",
      "type": "string",
      "suggested": true
    },
    "line": {
      "label": "Show line numbers?",
      "description": "By default, the block of code will show line numbers. You can disable this by setting this value to false.",
      "type": "boolean"
    },
    "highlight": {
      "label": "Highlight lines",
      "description": "You can supply a comma-delimited list of lines to highlight. E.g.: 1,7,13-15",
      "type": "string"
    },
    "1": {
      "label": "Content",
      "description": "The content to be shown in the block of code",
      "type": "string",
      "required": true
    }
  }
}
</templatedata>