From 7c21ef9a6d5626d3f65e7a5bf0991bc79a6080f1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 4 Jul 2017 12:54:05 +0530 Subject: [PATCH] Do not use zero-width spaces when generating man pages --- manual/build.py | 1 + manual/custom.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/manual/build.py b/manual/build.py index f8568be0f8..c34d51d718 100755 --- a/manual/build.py +++ b/manual/build.py @@ -77,6 +77,7 @@ def build_pot(base): def build_man_pages(language, base): + os.environ[b'CALIBRE_BUILD_MAN_PAGES'] = b'1' sphinx_build(language, base, builder='man', bdir=language) diff --git a/manual/custom.py b/manual/custom.py index ec8b32ca1b..149ba57752 100644 --- a/manual/custom.py +++ b/manual/custom.py @@ -239,7 +239,8 @@ def render_options(cmd, groups, options_header=True, add_program=True, header_le def mark_options(raw): - raw = re.sub(r'(\s+)--(\s+)', ur'\1-\u200b-\2', raw) + if 'CALIBRE_BUILD_MAN_PAGES' not in os.environ: + raw = re.sub(r'(\s+)--(\s+)', ur'\1-\u200b-\2', raw) def sub(m): opt = m.group()