Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize doctests as code? #79

Open
mrocklin opened this issue Jan 5, 2015 · 0 comments
Open

Recognize doctests as code? #79

mrocklin opened this issue Jan 5, 2015 · 0 comments

Comments

@mrocklin
Copy link

mrocklin commented Jan 5, 2015

http://stackoverflow.com/questions/27788586/have-pycco-recognize-doctests-as-code

Is there any way to have Pycco recognize doctests as code and render them appropriately?

E.g. the docstring of the following function

def fib(i):
    """ Fibonacci number

    >>> fib(10)
    55
    """
    if i < 2:
        return i
    else:
        return fib(i-1) + fib(i-2)

Renders In Pycco like the following

Fibonacci number

           fib(10) 5

Clearly the >>> was interpretted as indentation and code highlighting did not take effect. This seems like a common use case. is there a plugin somewhere that I'm missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant