From 97f1c5cfa126b42ab59cf5bb33102e59097f9215 Mon Sep 17 00:00:00 2001 From: Lily Ballard Date: Thu, 5 Jun 2025 01:46:53 -0700 Subject: [PATCH] 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 --- doc/manual/src/command-ref/nix-env/install.md | 4 ++-- lix/nix/nix.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/manual/src/command-ref/nix-env/install.md b/doc/manual/src/command-ref/nix-env/install.md index aa1204328..2f0fed92e 100644 --- a/doc/manual/src/command-ref/nix-env/install.md +++ b/doc/manual/src/command-ref/nix-env/install.md @@ -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 diff --git a/lix/nix/nix.md b/lix/nix/nix.md index d11639253..c7bee000f 100644 --- a/lix/nix/nix.md +++ b/lix/nix/nix.md @@ -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