~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/doc_generate/autodoc_rstx.py

  • Committer: bialix at ukr
  • Date: 2007-03-02 23:53:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2318.
  • Revision ID: bialix@ukr.net-20070302235316-8n8d4osjeha5c4ge
Fix for selftest of man generator with instaled plugin 'htmllog' (no help for plugin's log formatter)

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
    if options:
113
113
        option_str = "\n    Options:\n"
114
114
        for option_name, option in sorted(options.items()):
115
 
            l = '        --' + option_name
116
 
            if option.type is not None:
117
 
                l += ' ' + option.argname.upper()
118
 
            short_name = option.short_name()
119
 
            if short_name:
120
 
                assert len(short_name) == 1
121
 
                l += ', -' + short_name
122
 
            l += (30 - len(l)) * ' ' + option.help
123
 
            # TODO: Split help over multiple lines with
124
 
            # correct indenting and wrapping.
125
 
            wrapped = textwrap.fill(l, initial_indent='',
126
 
                                    subsequent_indent=30*' ')
127
 
            option_str = option_str + wrapped + '\n'
 
115
            for name, short_name, argname, help in option.iter_switches():
 
116
                l = '    --' + name
 
117
                if argname is not None:
 
118
                    l += ' ' + argname
 
119
                if short_name:
 
120
                    assert len(short_name) == 1
 
121
                    l += ', -' + short_name
 
122
                l += (30 - len(l)) * ' ' + (help or '')
 
123
                # TODO: Split help over multiple lines with
 
124
                # correct indenting and wrapping.
 
125
                wrapped = textwrap.fill(l, initial_indent='',
 
126
                                        subsequent_indent=30*' ')
 
127
                option_str = option_str + wrapped + '\n'       
128
128
 
129
129
    aliases_str = ""
130
130
    if cmd.aliases: