Merge pull request #3434 from ThomasWaldmann/fix-prune-man-page

fix building the "borg prune" man page, fixes #3398
This commit is contained in:
TW 2017-12-15 00:41:25 +01:00 committed by GitHub
commit 7317dc3239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -655,6 +655,8 @@ class build_man(Command):
examples = examples.replace(usage_include, '') examples = examples.replace(usage_include, '')
examples = examples.replace('Examples\n~~~~~~~~', '') examples = examples.replace('Examples\n~~~~~~~~', '')
examples = examples.replace('Miscellaneous Help\n------------------', '') examples = examples.replace('Miscellaneous Help\n------------------', '')
examples = examples.replace('``docs/misc/prune-example.txt``:', '``docs/misc/prune-example.txt``.')
examples = examples.replace('.. highlight:: none\n', '') # we don't support highlight
examples = re.sub('^(~+)$', lambda matches: '+' * len(matches.group(0)), examples, flags=re.MULTILINE) examples = re.sub('^(~+)$', lambda matches: '+' * len(matches.group(0)), examples, flags=re.MULTILINE)
examples = examples.strip() examples = examples.strip()
if examples: if examples: