Q:

Intellij - copy paste code to Onenote 2016 lost spaces with formatting

When I copy the code and comments from Intellij to Onenote. Surprisingly it lost its spaces. Is there any way to solve this problem. Please see screenshot below

what I am looking for is with formatting and indentation.

A:

A short term workaround (this has worked for me with other IDEs) is to paste the code in another application like Microsoft Word, and then paste the code in OneNote.
I'd also encourage you to give OneNote feedback via uservoice:
https://onenote.uservoice.com/forums/327186-onenote-for-windows/suggestions/38038366-intellij-copy-paste-code-to-onenote-lost-spaces

