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 missing last two lines #798

Closed
fladd opened this issue Oct 7, 2015 · 8 comments
Closed

Line numbers missing last two lines #798

fladd opened this issue Oct 7, 2015 · 8 comments

Comments

@fladd
Copy link

fladd commented Oct 7, 2015

The last two line numbers are not indicated for some reason. See also attached screenshot.

prism_line_numbers_bug

@Golmote
Copy link
Contributor

Golmote commented Oct 7, 2015

Could you provide on online example reproducing this issue? Also, which browser are you using to reproduce it?

@fladd
Copy link
Author

fladd commented Oct 7, 2015

@Golmote

http://ghost.fladd.de/welcome-to-ghost/

Safari and Chrome.

@Golmote
Copy link
Contributor

Golmote commented Oct 7, 2015

@fladd Thanks. The issue is due to the white-space: pre-wrap that is applied to code blocks in your screen.css stylesheet. Please use white-space: pre for code blocks highlighted with Prism.

@Golmote
Copy link
Contributor

Golmote commented Oct 7, 2015

Or if you really want to preserve the soft wrapping, you can take a look at this pending PR.

@fladd
Copy link
Author

fladd commented Oct 7, 2015

@Golmote Unfortunately, white-space: pre does not solve the problem.
I just added this to my prism.css (which is loaded after the screen.css). But the problem still persists. Actually, now the numbers don't even line up with the code lines...

Anything else wrong with my setup?

@Golmote
Copy link
Contributor

Golmote commented Oct 7, 2015

EDIT: @fladd Sorry, you might need to uncomment word-wrap: normal too.

@fladd
Copy link
Author

fladd commented Oct 7, 2015

@Golmote Indeed, word wrap was it.

To fix the issue of line numbers not lining up with the code: pre.line-numbers > code needs a padding-top: 6px. No clue why. But now it is lined up. Maybe this can be fixed in your default code?

@Golmote
Copy link
Contributor

Golmote commented Oct 7, 2015

I think it might have to do with other styles too. I'll check this out though.
For now, this issue is fixed ;)

@Golmote Golmote closed this as completed Oct 7, 2015
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