revert anchor prefix for builtin constants

the original change broke many pre-existing anchor links.

also change formatting of the constants listing slightly:
- the type should not be part of the anchor
- add highlight to the "impure only" note
This commit is contained in:
Valentin Gagarin 2023-07-20 10:27:38 +02:00
parent 453c4be93c
commit 0e4f6dfcf7
2 changed files with 6 additions and 4 deletions

View file

@ -10,12 +10,14 @@ let
type' = optionalString (type != null) " (${type})"; type' = optionalString (type != null) " (${type})";
impureNotice = optionalString impure-only '' impureNotice = optionalString impure-only ''
Not available in [pure evaluation mode](@docroot@/command-ref/conf-file.md#conf-pure-eval). > **Note**
>
> Not available in [pure evaluation mode](@docroot@/command-ref/conf-file.md#conf-pure-eval).
''; '';
in in
squash '' squash ''
<dt id="builtin-constants-${name}"> <dt id="builtins-${name}">
<a href="#builtin-constants-${name}"><code>${name}</code>${type'}</a> <a href="#builtins-${name}"><code>${name}</code></a>${type'}
</dt> </dt>
<dd> <dd>

View file

@ -806,7 +806,7 @@ struct EvalSettings : Config
List of directories to be searched for `<...>` file references List of directories to be searched for `<...>` file references
In particular, outside of [pure evaluation mode](#conf-pure-evaluation), this determines the value of In particular, outside of [pure evaluation mode](#conf-pure-evaluation), this determines the value of
[`builtins.nixPath`](@docroot@/language/builtin-constants.md#builtin-constants-nixPath). [`builtins.nixPath`](@docroot@/language/builtin-constants.md#builtins-nixPath).
)"}; )"};
Setting<bool> restrictEval{ Setting<bool> restrictEval{