diff --git a/share/tools/create_manpage_completions.py b/share/tools/create_manpage_completions.py index ab6c274cb..c58adae2d 100755 --- a/share/tools/create_manpage_completions.py +++ b/share/tools/create_manpage_completions.py @@ -363,7 +363,7 @@ class Type2ManParser(ManParser): options_section = options_section_matched.group(1) - options_parts_regex = re.compile("\.[I|T]P( \d+(\.\d)?i?)?(.*?)\.[I|T]P", re.DOTALL) + options_parts_regex = re.compile("\.[I|T]P( \d+(\.\d)?i?)?(.*?)\.([I|T]P|UNINDENT)", re.DOTALL) options_matched = re.search(options_parts_regex, options_section) add_diagnostic('Command is %r' % CMDNAME) @@ -774,7 +774,8 @@ def parse_manpage_at_path(manpage_path, output_directory): # Output the magic word Autogenerated so we can tell if we can overwrite this built_command_output.insert(1, "# Autogenerated from man page " + manpage_path) - built_command_output.insert(2, "# using " + parser.__class__.__name__) + # built_command_output.insert(2, "# using " + parser.__class__.__name__) # XXX MISATTRIBUTES THE CULPABILE PARSER! Was really using Type2 but reporting TypeDeroffManParser + for line in built_command_output: output_file.write(line) output_file.write('\n')