Skip to content

libcmd: Fix rendering of absolute URLs in markdown, update lowdown to 2.0.2#13780

Merged
Mic92 merged 2 commits intoNixOS:masterfrom
xokdvium:lowdown-2
Aug 18, 2025
Merged

libcmd: Fix rendering of absolute URLs in markdown, update lowdown to 2.0.2#13780
Mic92 merged 2 commits intoNixOS:masterfrom
xokdvium:lowdown-2

Conversation

@xokdvium
Copy link
Copy Markdown
Contributor

Motivation

lowdown >= 1.4.0 supports LOWDOWN_TERM_NORELLINK to render
absolute urls. This is useful, since we want to keep links to
web resources and such intact.

Context

Resolves #13312


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

lowdown >= 1.4.0 supports LOWDOWN_TERM_NORELLINK to render
absolute urls. This is useful, since we want to keep links to
web resources and such intact.
@xokdvium xokdvium requested a review from edolstra as a code owner August 17, 2025 17:48
@xokdvium xokdvium requested a review from roberth August 17, 2025 17:49
Nixpkgs has been updated with this version and seems
like next stable nixos release will ship with lowdown 2.0.
@Mic92 Mic92 merged commit d48e04b into NixOS:master Aug 18, 2025
14 checks passed
@vcunat
Copy link
Copy Markdown
Member

vcunat commented Aug 18, 2025

FYI, the bmake addition does cause some issues, apparently:
https://hydra.nixos.org/eval/1817760#tabs-now-fail

@xokdvium
Copy link
Copy Markdown
Contributor Author

Ah right, that should be buildPackages.bmake

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Aug 19, 2025

That's because .overrideAttrs doesn't play well with splicing? I didn't know that.

@xokdvium
Copy link
Copy Markdown
Contributor Author

doesn't play well with splicing

Apparently

@juhp
Copy link
Copy Markdown
Contributor

juhp commented Nov 19, 2025

Unfortunately manpages are still rendering relative links: 〈 @docroot@/.../.md 〉.

(There are still real relative links in nix --help too but that is not so distracting.)

I opened kristapsdz/lowdown#170 for the manpage case.

A very simple workaround to cleanup with sed, I am introducing in fedora is:

sed -i -e '/^\.UR [#.]/d' %{buildroot}%{_mandir}/man*/*

which removes 98% of the relative links from the manpages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown link targets are lost in :doc

5 participants