docs: emphasise "Plugin default" to match nixpkgs

Nixpkg's "headings" are emphasised in italics ("Default", "Example",
"Type", etc). We should match the style.
This commit is contained in:
Matt Sturgeon 2024-06-07 17:47:33 +01:00
parent ade4539b3f
commit b2a477260d
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -130,7 +130,7 @@ rec {
# TODO deprecate this behavior so we can properly quote strings # TODO deprecate this behavior so we can properly quote strings
defaultString = if isString default then default else generators.toPretty { } default; defaultString = if isString default then default else generators.toPretty { } default;
defaultDesc = defaultDesc =
"Plugin default:" "_Plugin default:_"
+ ( + (
# Detect whether `default` is multiline or inline: # Detect whether `default` is multiline or inline:
if hasInfix "\n" defaultString then "\n\n```nix\n${defaultString}\n```" else " `${defaultString}`" if hasInfix "\n" defaultString then "\n\n```nix\n${defaultString}\n```" else " `${defaultString}`"