This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek, docs@python, eric.araujo, ezio.melotti, georg.brandl, ncoghlan, python-dev, sandro.tosi, taschini, terry.reedy
Date 2012-10-03.07:12:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349248341.77.0.520955737495.issue12947@psf.upfronthosting.co.za>
In-reply-to
Content
I thought of an easy work-around we can use after looking at the changeset Terry referenced above:

> [2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef

At the expense of pretty color highlighting, we can enable Pygments' TextLexer for the affected examples (aka "null" lexer).  For example--

.. code-block:: text

   >>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL
   Traceback (most recent call last):
   CustomError: message

I confirmed locally that this works.  I realized this might work because the Sphinx changeset referenced above has this logic:

    # trim doctest options if wanted
    if isinstance(lexer, PythonConsoleLexer) and self.trim_doctest_flags:
History
Date User Action Args
2012-10-03 07:12:21chris.jerdoneksetrecipients: + chris.jerdonek, georg.brandl, terry.reedy, ncoghlan, ezio.melotti, eric.araujo, sandro.tosi, docs@python, python-dev, taschini
2012-10-03 07:12:21chris.jerdoneksetmessageid: <1349248341.77.0.520955737495.issue12947@psf.upfronthosting.co.za>
2012-10-03 07:12:21chris.jerdoneklinkissue12947 messages
2012-10-03 07:12:21chris.jerdonekcreate