When pasting code in a code block indentation is totally messed up

Things I have tried

Obsidian: v0.12.3

It seems similar to this: Code doesn't maintain indentation when copy-pasted inside the code block

But is different. My indents actually become outdents. I have tried Ctrl-Shift-V, and I have tried right-clicking and Paste as text.

What I’m trying to do

I am trying to paste code into Obsidian as a code block. When you paste it the indentation is all messed up in editing mode. Also when typing in a code block, space and tab create hanging indents instead of actually doing space or tab. Please see the image attached.

In preview mode, and when copying the text from the editor mode and pasting in another editor or outside a code block is fine. I am primarily in Edit mode, so having it appear like this is annoying and confusing.

Anyone else experience this?

1 Like

This must have to do with the theme. I changed to Night Owl and it works as expected. The issue was happening with [[Obsidianite]].

Anyone else notice this behavior? Maybe my Obsidianite installation got corrupted somehow.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.