~vila/bzr/956860-doc-generate

« back to all changes in this revision

Viewing changes to bzrlib/doc_generate/autodoc_man.py

  • Committer: Jelmer Vernooij
  • Date: 2012-03-14 16:58:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6504.
  • Revision ID: jelmer@samba.org-20120314165827-bit49al860i9zxsz
Prevent lines starting with a dot to accidentally be interpreted as a roff macro.

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
    doc = "%s\n" % (cmd.__doc__)
112
112
    doc = bzrlib.help_topics.help_as_plain_text(cmd.help())
113
113
 
 
114
    # A dot at the beginning of a line is interpreted as a macro.
 
115
    # Simply join lines that begin with a dot with the previous
 
116
    # line to work around this.
 
117
    doc = doc.replace("\n.", ".")
 
118
 
114
119
    option_str = ""
115
120
    options = cmd.options()
116
121
    if options: