From da8903ecc3484c4c6cf4ab6b35da250e435d1964 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 22 Mar 2023 13:11:35 +0100 Subject: nix help-stores: Don't include anchors Since setting names are not unique we don't have an easy way to produce unique anchors. --- doc/manual/utils.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/manual/utils.nix b/doc/manual/utils.nix index c0a40c9ff..a0e5cf1d1 100644 --- a/doc/manual/utils.nix +++ b/doc/manual/utils.nix @@ -39,12 +39,12 @@ rec { filterAttrs = pred: set: listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set)); - showSetting = useSpans: name: { description, documentDefault, defaultValue, aliases, ... }: + showSetting = useAnchors: name: { description, documentDefault, defaultValue, aliases, ... }: let result = squash '' - - ${if useSpans + - ${if useAnchors then ''[`${name}`](#conf-${name})'' - else ''[`${name}`](#conf-${name})''} + else ''`${name}`''} ${indent " " body} ''; @@ -79,5 +79,5 @@ rec { in result; - showSettings = useSpans: settingsInfo: concatStrings (attrValues (mapAttrs (showSetting useSpans) settingsInfo)); + showSettings = useAnchors: settingsInfo: concatStrings (attrValues (mapAttrs (showSetting useAnchors) settingsInfo)); } -- cgit v1.2.3