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

Extra padding in "literalinclude" directive #417

Closed
argaen opened this issue Apr 27, 2017 · 16 comments
Closed

Extra padding in "literalinclude" directive #417

argaen opened this issue Apr 27, 2017 · 16 comments
Labels
Needed: more information A reply from issue author is required

Comments

@argaen
Copy link

argaen commented Apr 27, 2017

Details

Expected Result

the code snippets should appear without the extra bottom padding. Only happens when using the literalinclude directive. For example in the two big code snippets in http://aiocache.readthedocs.io/en/latest/configuration.html.

Actual Result

Extra padding added coming I don't know from where:

screenshot from 2017-04-23 12-28-21

@klas-genestack
Copy link

It was fine at least in v0.1.9 (I've just updated from it).

@klas-genestack
Copy link

I've bisected this issue:

f22bfd278ef369e7de7ac7789b59622c1ddd53ab is the first bad commit
commit f22bfd278ef369e7de7ac7789b59622c1ddd53ab
Author: Denis Volpato Martins <denis@ostec.com.br>
Date:   Mon Dec 5 12:35:53 2016 -0200

    Add 'Edit on GitLab' support

:100644 100644 1c15151d6d896298dbfa1c6bf998be8db31f4d51 ac708862f724da85c83667452d2c008b86db1be7 M	bower.json
:040000 040000 bd056e6f5ebb7726aad75c8fae6f4b5e3c340445 6251f5c40614b878b9c929cb01e3a2765186d44e M	sass
:040000 040000 227bee87670b068757a893aff7a932c4b125544e aa2dcba71a3f70e256e15c2527611dd7f4ce4825 M	sphinx_rtd_theme

@denisvm, can I interest you in this? =)

@Blendify
Copy link
Member

Are you sure? That commit does nothing that might affect this.

@denisvm
Copy link
Contributor

denisvm commented May 19, 2017

@Blendify, actually @klas-genestack may be right. My changes didn't cause this issue, but when I ran grunt, it updated the minified CSS files, inheriting all the older modifications that were made only in the source SASS files.

With that I've inherited the change made in #344 (Fix spacing in pre) with 7f307a8. If you disable this change, it'll fix this specific issue.

This is related to #381.

@klas-genestack
Copy link

@Blendify, I'm pretty sure it does (you can test yourself: I can provide you all the data, if you're interested), and I think @denisvm interprets it correctly.

@szabolcsdombi
Copy link

I get the same problem.

@szabolcsdombi
Copy link

Those are not extra lines:

In my case the file has 51 lines and the line numbers have different height values so those are shifted.

I just changed the class on the code:

image

and now I get

image

previously it was

image

@szabolcsdombi
Copy link

The problem is in the theme.css

.rst-content .highlight>pre {
    line-height: normal; /* this should be removed */
}

@szabolcsdombi
Copy link

A quick hack to solve the issue:

Add this to a static css then load it from the conf.py

.rst-content .highlight>pre {
    line-height: 18px;
}

@TonyFlury
Copy link

Sorry if this is the wrong place to add this comment, but any idea when this will get fixed ? I use the rtd theme a lot and a quick fix would be useful.

sebp added a commit to sebp/PyGObject-Tutorial that referenced this issue Aug 1, 2017
@Blendify
Copy link
Member

#504 Should fix this can people try using it?

@Blendify Blendify added the Needed: more information A reply from issue author is required label Dec 17, 2017
@Blendify
Copy link
Member

Im closing this issue if people still have an issue after using latest master then we can re-open

@TonyFlury
Copy link

Can someone state when this latest master will be deployed on pypi ? I don’t want my documentation to be based on non released builds of the ‘latest master’

@szabolcsdombi
Copy link

Using the sphinx_rtd_theme from PyPI:

image

the bug is still present


Using the sphinx_rtd_theme from github:

the bug is fixed

python -m pip install https://github.com/rtfd/sphinx_rtd_theme/archive/master.zip -U

image

Version info:

>>> import sphinx_rtd_theme
>>> sphinx_rtd_theme.__version__
'0.2.5b2'

@TonyFlury
Copy link

TonyFlury commented Jan 15, 2018 via email

@Blendify
Copy link
Member

@ericholscher @agjohnson Can we please take the steps to release 0.2.5!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: more information A reply from issue author is required
Projects
None yet
Development

No branches or pull requests

6 participants