Template:IPaddr/doc

Introduction
Template is used to make an IP address stand out in the text, to improve readability. An IP address is displayed in italic type, using lower case letters for IPv6 addresses.

Arguments
The first parameter is the IP address to be displayed. The second parameter is optional and indicates the number of bits in the network address in CIDR notation. If given, it is appended to the first with a slash (/) as a separator. When the option  is set, the second argument (if present) is translated to a dotted decimal netmask.

Examples
yields:.

adds the network mask as is:, but

yields: which adds some non-breaking space around the slash ('/') separator, to improve readability.

yields just the netmask:.

yields:, which might sometimes be useful.

yields just the netmask in dotted decimal notation: (without the slash).

yields: (all lower case, as these are preferred in IPv6 addresses).

Template data
{	"description": "Template is used to make an IP address stand out in the text, to improve readability.", "params": { "1": {			"description": "The IP address to display, either IPv4 or IPv6. An IP address is displayed in italics, using lower case letters for IPv6 addresses.", "example": "198.51.100.52 or 2001:db8:3fb6:3::12f", "type": "string", "label": "IP address", "suggested": true },		"2": {			"description": "Number of bits in the netmask, displayed with a leading slash in CIDR notation.", "example": "24", "type": "number", "label": "Netmask bits" },		"netmask": { "description": "When set to 'dotted' the netmask is displayed in dotted-decimal, rather than CIDR notation. If there is no IP address specified, the slash is not displayed.", "type": "string", "example": "dotted", "label": "netmask style" }	},	"format": "inline" }