Georg Brandl avatar Georg Brandl committed 93630d9 Merge

merge

Comments (0)

Files changed (2)

 
 * #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

sphinx/ext/autodoc.py

                 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.