Code alignment incorrect while copying from codeblock
I have a document which is published as a PDF. There are multiple codeblocks containing code within the document. THe alignment of the code displayed in the PDF is correct. When I copy the codeblock from the output and paste it in a txt file, I see that the alignment is not correct. The leading spaces are not shown, and so all the lines start at the same level. Is there any way to fix the alignment issue while copying the codeblock?