I am trying to build an ebook from a programming tutorial (markdown):
it contains many code blocks with comments; the comment lines are too long for the width of my Kobo H2O v2 reader, so I can't read the end...
I tried adding a CSS style for wrapping:
<style>pre code { white-space: pre-wrap !important; }</style>
It makes no difference to the Kobo default reader (nickel)...
However, the
ebook-viewer
command from calibre detects it and wraps them (instead of creating an horizontal scroll bar).Also, inside Koreader, all exceeding lines are wrapped, no matter what CSS I add.
How do I make the default Kobo reader automatically wrap pre
lines, without changing the source markdown?
Here is a similar unanswered question.