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.
This commit is contained in:
pennae
2023-02-03 01:57:42 +01:00
committed by Florian Brandes
parent 820e337cfa
commit f80fbfd61f

View File

@@ -177,7 +177,7 @@ class ManpageRenderer(Renderer):
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: