Hey @karanmariojude,
Not sure if you’re having the issue with exporting still.
I have had the same kind of issue and managed to find a workaround by specifying code blocks rather than the <pre> and <code> tags.
PDF Export - Code Blocks Unreadable - check the updated section of my post.
Would be interested to find out if this resolves your issue 
Cheers
Solitaire!