I'm following the instructions from this answer:
Copy Notepad++ text with formatting?
The idea is to use the NppExport plug in to keep syntax formatting when you copy/paste from Notepad++ (there are different ways to do it - great answers over there).
Everything works as expected when pasting code into, say, Word 2016. But when pasting into OneNote 2016 it appears to trim CR/LFs. It works if I first paste into Word, then copy/paste from Word to OneNote.
1 picture == 1k words:
Why doesn't it work with OneNote and what can I do about it?