crossnote icon indicating copy to clipboard operation
crossnote copied to clipboard

Scrollbar problem when converting html to pdf

Open leozzyzheng opened this issue 7 years ago • 2 comments

After generating markdown to html, the code block has long code line will have scrollbar in html, it will cause the pdf truncate the code block.

I think using the css to wrap the long code line when converting to pdf is useful. Is there any option could do this?

leozzyzheng avatar May 22 '18 12:05 leozzyzheng

I think I had found the solution: Change white-space: pre to white-space: pre-wrap

See https://github.com/github/markup/issues/168 and https://stackoverflow.com/questions/38443545/how-to-display-code-blocks-with-word-wrap-and-line-number-with-jekyll-markdown-o

leozzyzheng avatar May 22 '18 12:05 leozzyzheng

It would be great helpful to add options to let users could change the css in previewTheme from white-space: pre to white-space: pre-wrap.

leozzyzheng avatar May 22 '18 13:05 leozzyzheng