nix help-stores: Don't include anchors
Since setting names are not unique we don't have an easy way to produce unique anchors.
This commit is contained in:
parent
c967c29290
commit
da8903ecc3
1 changed files with 4 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue