Fix markdown link edge cases

Lowdown doesn't quite conform to CommonMark in parsing shortcut links
that are followed by a parenthesized expression, which looks like
`[link text] (unrelated text)`. CommonMark says the space there is
significant and ensures the `[link text]` is parsed as a shortcut link,
but Lowdown parses this like `[link text](unrelated text)`.

This fixes the output of `nix help`. The other case of a near-link was
in the `nix-env --install` docs, which don't get parsed by Lowdown, but
it turns out the link reference definition was missing. The generated
manpage stripped the brackets but the HTML manual page rendered the
broken link with brackets.

Change-Id: I6a6a69641fd2dbf9930bcd875ed21ea80fba909a
This commit is contained in:
Lily Ballard
2025-06-15 19:04:00 -07:00
parent 7453e2979f
commit 97f1c5cfa1
2 changed files with 3 additions and 3 deletions
@@ -148,8 +148,8 @@ To copy the store path with symbolic name `gcc` from another profile:
$ nix-env --install --from-profile /nix/var/nix/profiles/foo gcc
```
To install a specific [store derivation] (typically created by
`nix-instantiate`):
To install a specific [store derivation](@docroot@/glossary.md#gloss-store-derivation)
(typically created by `nix-instantiate`):
```console
$ nix-env --install /nix/store/fibjb1bfbpm5mrsxc4mh2d8n37sxh91i-gcc-3.4.3.drv
+1 -1
View File
@@ -320,7 +320,7 @@ operate are determined as follows:
a command like `nix shell nixpkgs#libxml2` will provide only those
two outputs by default.
Note that a [store derivation] (given by its `.drv` file store path) doesn't have
Note that a [store derivation][] (given by its `.drv` file store path) doesn't have
any attributes like `meta`, and thus this case doesn't apply to it.
[store derivation]: ../../glossary.md#gloss-store-derivation