aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/utils.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-03-22 13:11:35 +0100
committerEelco Dolstra <edolstra@gmail.com>2023-03-22 13:11:35 +0100
commitda8903ecc3484c4c6cf4ab6b35da250e435d1964 (patch)
tree769fa0e72fc050d4e3cda7fb7666b21c0c3d0d38 /doc/manual/utils.nix
parentc967c29290b1d0b7ea5a169c39324ddca46403ba (diff)
nix help-stores: Don't include anchors
Since setting names are not unique we don't have an easy way to produce unique anchors.
Diffstat (limited to 'doc/manual/utils.nix')
-rw-r--r--doc/manual/utils.nix8
1 files changed, 4 insertions, 4 deletions
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 ''<span id="conf-${name}">[`${name}`](#conf-${name})</span>''
- 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));
}