-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Odd line width/wrapping in PDF code blocks #1234
Comments
Hi! It’s fixed in the current |
It’s a duplicate of #1000. |
@liZe Thanks, using the latest code from master works much better 👍 I'm still seeing something a little odd with how very long lines wrap, though. (I can make a separate ticket if you'd like, but maybe it's already covered by another one.) HTML: PDF: The PDF does wrap it, but each line is cut off prematurely, and there are some extra blank lines after the last wrapped line. |
Oh, that’s odd, for sure 😒.
I’d love that! |
Hello! Apologies if this is documented somewhere, but I couldn't find an answer when I did some searching.
I'm using Pandoc to convert Markdown to PDF, with WeasyPrint as the
--pdf-engine
. Everything looks good, except for the line width and wrapping in code blocks. Pandoc's intermediate HTML file looks okay, which is why I think this is something on the WeasyPrint side.I've created a repository to show what I'm doing:
Here are the HTML and PDF files generated by the invocations in the GitHub workflow:
samples.zip
How the HTML looks (what I want)
How the PDF looks (not what I want):
The PDF has a lot of unnecessary line wrapping, far before the edge of the code block. I would only want lines to wrap if they extend to the far edge of the code block.
I've also experimented with specifying some extra CSS, but it didn't seem to help, and I'm not sure why the default CSS would look okay in the HTML version but not in the PDF version anyway.
The text was updated successfully, but these errors were encountered: