-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Formatting of Exceptions in apidoc examples #2830
Copy link
Copy link
Closed
Description
I'm using sphinx-apidoc to generate documentation for a project. The project already uses doctest and so many of the docstrings contain code snippets that serve as both examples and test cases.
I was pleased to find that sphinx automatically formats the example code nicely, but I seem to have found one specific case in which it doesn't work for me.
In the attached example file, the first two example code snippets are correctly formatted by apidoc, the final example is not (using the alabaster theme, I get the grey box for a code snippet but no syntax highlighting).
The difference appears to be using a user-defined exception rather than an inbuilt one. Is there a way to have an example raising a user-defined exception work correctly?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
