- Create a new file.
- Add a codeblock that contains tabs at the beginning of the code lines (inside ```'s).
- Switch to preview mode.
- Copy the code inside of the code block.
Code is copied just as it was in the obsidian document, tabs are copied as tabs.
Instead, tabs are replaced with spaces. That is extremely inconvenient, because it makes it impossible to copy the code from the preview mode, and paste it into the code editor.