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

Line numbers don't match code lines #10

Open
lgarcin opened this issue Sep 10, 2017 · 1 comment
Open

Line numbers don't match code lines #10

lgarcin opened this issue Sep 10, 2017 · 1 comment

Comments

@lgarcin
Copy link

lgarcin commented Sep 10, 2017

The lines in the output of .. runblock:: pycon are too small. When use with the :linenos: flag, the line numbers don't match code lines.

For example

.. runblock:: pycon
    :linenos:

    >>> a = (1, 'a', 2, 'b', 3, 'c', 4, 'd', 5, 'e', 6, 'f')
    >>> a[3]
    >>> a[2:]
    >>> a[:5]
    >>> a[-3]
    >>> a[2:9:2]
    >>> a[8:1:-3]

produces
image

@WhyNotHugo
Copy link
Owner

I don't think this can trivially fixed: this sphinx extension just generates the block, and the line numbers are later added by sphinx. We've no control over line numbers, so there's not much we can do on our end.

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

2 participants