mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-19 05:49:14 +00:00
Merge pull request #3099 from ThomasWaldmann/manpage-issue-role-1.1
implement simple "issue" role for manpage generation, fixes #3075
This commit is contained in:
commit
3bc76a0a25
1 changed files with 7 additions and 0 deletions
7
setup.py
7
setup.py
|
@ -653,6 +653,13 @@ def write_see_also(self, write, man_title):
|
|||
def gen_man_page(self, name, rst):
|
||||
from docutils.writers import manpage
|
||||
from docutils.core import publish_string
|
||||
from docutils.nodes import inline
|
||||
from docutils.parsers.rst import roles
|
||||
|
||||
def issue(name, rawtext, text, lineno, inliner, options={}, content=[]):
|
||||
return [inline(rawtext, '#' + text)], []
|
||||
|
||||
roles.register_local_role('issue', issue)
|
||||
# We give the source_path so that docutils can find relative includes
|
||||
# as-if the document where located in the docs/ directory.
|
||||
man_page = publish_string(source=rst, source_path='docs/virtmanpage.rst', writer=manpage.Writer())
|
||||
|
|
Loading…
Reference in a new issue