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 misaligned for literalinclude #258

Closed
rscohn2 opened this issue Nov 10, 2020 · 5 comments · Fixed by #263
Closed

line numbers misaligned for literalinclude #258

rscohn2 opened this issue Nov 10, 2020 · 5 comments · Fixed by #263
Labels
bug Something isn't working

Comments

@rscohn2
Copy link
Contributor

rscohn2 commented Nov 10, 2020

line numbers are misaligned for literalinclude

Tried 0.39 and master

Add this to a document:

.. literalinclude:: code.cpp
   :linenos:

Where code.cpp is:

a
b
c
d

and

make html

See the attached screenshot where the line numbers are half a line lower than the code.

lineno

This might be related: readthedocs/readthedocs.org#3470

@rscohn2 rscohn2 added the bug Something isn't working label Nov 10, 2020
@welcome
Copy link

welcome bot commented Nov 10, 2020

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@rscohn2
Copy link
Contributor Author

rscohn2 commented Nov 12, 2020

Here is an online example. If someone could diagnose the css in it, I could find the problem in the source code

https://sycl.readthedocs.io/en/latest/iface/platform.html

@choldgraf
Copy link
Member

huh that is weird - setting padding-top to 0 doesn't seem to fix it, even though it looks like the padding on the top is the issue here. @AakashGfude have you run into something like this before where the padding and the CSS rule don't match correctly?

@AakashGfude
Copy link
Member

@choldgraf , it was a vertical-align property issue here actually. making it baseline or top fixes the issue. I will open a PR for this.

@rscohn2
Copy link
Contributor Author

rscohn2 commented Nov 15, 2020

Thanks for the quick resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants