shd101wyy / crossnote

Powerful markdown tool
Other
499 stars 126 forks source link

Scrollbar problem when converting html to pdf #69

Open leozzyzheng opened 6 years ago

leozzyzheng commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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.