diff options
author | pennae <github@quasiparticle.net> | 2023-02-03 01:57:42 +0100 |
---|---|---|
committer | pennae <82953136+pennae@users.noreply.github.com> | 2023-02-08 15:23:34 +0100 |
commit | 3c7fd940ba22a735cfc267bb641e0bce4e23677e (patch) | |
tree | 803e89618c601dd535628f177f9a794a2fd16adb | |
parent | f47adfcb6f8bdb617c78579d51bc3e0dc25ac74a (diff) |
nixos-render-docs: indent and embolden list item heads in manpages
this matches what html outputs do more closely, and feels like it'll be easier to read because it looks less like just another paragraph.
-rw-r--r-- | pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manpage.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manpage.py b/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manpage.py index d1cd8c95a7c79..c6836ade33be6 100644 --- a/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manpage.py +++ b/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manpage.py @@ -172,12 +172,12 @@ class ManpageRenderer(Renderer): lst.first_item_seen = True head = "•" if lst.next_idx is not None: - head = f" {lst.next_idx}." + head = f"{lst.next_idx}." lst.next_idx += 1 return ( f'{maybe_space}' f'.RS {lst.width}\n' - f"\\h'-{lst.width}'{man_escape(head)}\\h'{lst.width - len(head)}'\\c" + f"\\h'-{len(head) + 1}'\\fB{man_escape(head)}\\fP\\h'1'\\c" ) def list_item_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict, env: MutableMapping[str, Any]) -> str: |