1. Georg Brandl
  2. sphinx

Commits

Georg Brandl  committed 93630d9 Merge

merge

  • Participants
  • Parent commits 19e2191, 0db2e85
  • Branches default

Comments (0)

Files changed (2)

File CHANGES

View file
 
 * #387: Fix the display of search results in ``dirhtml`` output.
 
+* #376: In autodoc, fix display of parameter defaults containing
+  backslashes.
+
 * #370: Fix handling of complex list item labels in LaTeX output.
 
 * #374: Make the ``doctest_path`` config value of the doctest

File sphinx/ext/autodoc.py

View file
                 argspec = inspect.getargspec(self.object.__init__)
                 if argspec[0]:
                     del argspec[0][0]
-        return inspect.formatargspec(*argspec)
+        args = inspect.formatargspec(*argspec)
+        # escape backslashes for reST
+        args = args.replace('\\', '\\\\')
+        return args
 
     def document_members(self, all_members=False):
         pass