1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-24 15:12:00 +00:00

fix building the "borg prune" man page, fixes #3398

will fix all ".. highlight:: none" issues (just killing it).

also a slight punctuation fix, so there is a dot at the end of
the prune man page.

(cherry picked from commit 1f5b8c9219)
This commit is contained in:
Thomas Waldmann 2017-12-13 04:33:50 +01:00
parent b62d349740
commit 747ada77e6

View file

@ -651,6 +651,8 @@ def write_examples(self, write, command):
examples = examples.replace(usage_include, '')
examples = examples.replace('Examples\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 = examples.strip()
if examples: