mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos-render-docs: style file literals in manpages
similar to inline code these were indistinguishale from other text. render then in italic font instead, like mdoc .Pa does.
This commit is contained in:
parent
29252d1477
commit
1e4bafdbc5
1 changed files with 1 additions and 3 deletions
|
@ -285,9 +285,7 @@ class ManpageRenderer(Renderer):
|
|||
env: MutableMapping[str, Any]) -> str:
|
||||
if token.meta['name'] in [ 'command', 'env', 'option' ]:
|
||||
return f'\\fB{man_escape(token.content)}\\fP'
|
||||
elif token.meta['name'] == 'file':
|
||||
return f'{man_escape(token.content)}'
|
||||
elif token.meta['name'] == 'var':
|
||||
elif token.meta['name'] in [ 'file', 'var' ]:
|
||||
return f'\\fI{man_escape(token.content)}\\fP'
|
||||
elif token.meta['name'] == 'manpage':
|
||||
[page, section] = [ s.strip() for s in token.content.rsplit('(', 1) ]
|
||||
|
|
Loading…
Reference in a new issue