From 23c78a74e4c6ae1fb98172c7095dae62f45b73ec Mon Sep 17 00:00:00 2001 From: MaxVerevkin <79253435110@ya.ru> Date: Thu, 9 Jul 2020 23:56:36 +0300 Subject: [PATCH] create_manpage_completions.py: do not use '|' in '[]' in regex --- share/tools/create_manpage_completions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/tools/create_manpage_completions.py b/share/tools/create_manpage_completions.py index 00c890267..ca7011cb1 100755 --- a/share/tools/create_manpage_completions.py +++ b/share/tools/create_manpage_completions.py @@ -392,7 +392,7 @@ class Type2ManParser(ManParser): options_section_regex = re.compile("\.SH OPTIONS(.*?)(\.SH|\Z)", re.DOTALL) options_section = re.search(options_section_regex, manpage).group(1) - options_parts_regex = re.compile("\.[I|T]P( \d+(\.\d)?i?)?(.*?)\.([I|T]P|UNINDENT)", re.DOTALL) + options_parts_regex = re.compile("\.[IT]P( \d+(\.\d)?i?)?(.*?)\.([IT]P|UNINDENT)", re.DOTALL) options_matched = re.search(options_parts_regex, options_section) add_diagnostic("Command is %r" % CMDNAME)