I'm not at a computer at the moment but I think that if you change `pre` into `pre-wrap` on line 13 you will be good.

Den tors 17 okt. 2019 14:41Gabriel Volpe <volpegabriel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
It seems to be caused by the CSS supplied by Pandoc. 

I found this SO Thread about it but none of the suggested solutions worked for me.

Here's one single small HTML page taken from the Pandoc generated EPUB file that has the relevant `sourceCode` CSS.

https://pastebin.com/DPczzLar

Thanks for helping!
Gabriel.

On Thu, 17 Oct 2019 at 03:19, BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Do you think it is caused by some CSS which is supplied by Pandoc or do you add any CSS of your own? If the latter would you mind sending the CSS so we can have a look at it? (Off list is OK but be warned that my CSS knowledge is a bit stale. It is probably nothing complicated though.)

Den tors 17 okt. 2019 03:17Gabriel Volpe <volpegabriel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
It is definitely CSS related but I'm just really dumb when it comes to manipulate CSS, would appreciate any help. 

On Wed, Oct 16, 2019, 18:25 Gabriel Volpe <volpegabriel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I have converted the Pandoc generated EPUB to EPUB once again using Calibre and it renders properly. When I resize the screen there's no scrollbar.

On Wed, 16 Oct 2019 at 18:20, Gabriel Volpe <volpegabriel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
It might be. I'm not really sure, to be honest.

On Wed, 16 Oct 2019 at 18:18, BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Isn't that an issue with the way your epub reader displays things rather than with Pandoc? 

Den ons 16 okt. 2019 23:41Gabriel Volpe <volpegabriel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Hi, is there any way to avoid having horizontal scrollbars in code highlightings? I would prefer the text to be rendered in different lines instead like MOBI does it.

scrollbar.png


I couldn't find anything related information in Pandoc's manual. While searching on Google, I stumbled upon this blog post which advices to convert first to HTML and then use Calibre to convert to EPUB but I've tried it and I didn't like it.

Thanks,
Gabriel.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/93a42423-c2c0-4350-b59c-42722cc2dd2e%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/LSJ4WHOki-k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDTGLozWoY3KnJNEQ%3DQFSrsRt07JoKHprf-hm6rehCzpQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAJReL34Kv%2Bhj8yZeajmGLoLdXonSYs0jtx8RRAU3x98wXucYwA%40mail.gmail.com.

--
You received this message because you are subscribed to a topic in the Google Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/LSJ4WHOki-k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBz_QZwY%3DtADQLVm_HdUSicEo8g10BPHu2esVKi7Fb7AQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAJReL34fkofrhE2xys-z%3DLS1NGOg65zO7ydpvOeq7qeqd-BquA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBLfROtLxFbqQMAHeTTNNf972XVY%2BUKiPcBR8HW7KiiLA%40mail.gmail.com.