Don't add formatting to pasted codeblocks when pasting inside a codeblock

Use case or problem

Let’s say I paste code from a website and it creates this codeblock:


Then I find more code on a website:


If I paste it with the cursor right after code, the markdown would look like this:


Proposed solution

Obsidian should recognize that code is being pasted into a codeblock and should not create the markdown for a codeblock inside of it.

1 Like

@ariehen I see you moved it from Bug Reports to Feature Requests. Funny thing is, I had originally put it there until moving to Bug Reports right after.

Do you think this could go in either one? What I described is something that shouldn’t happen, which is why I put it as a bug. When I think about it though I guess it doesn’t fit there since its not a matter of something not working correctly.

What do you think? Do you think its that only bugs (things that don’t work as intended) should go in Bug Reports, and things that work properly but not good be elsewhere?

Whitenoise usually takes care of the bug reports category, but I happened to notice this one and moved it.

Without getting into a discussion of what one considers a bug or not, your original post has parts of the Feature Request template, so I thought you mistakenly put it in the Bug Reports category.

I’m sure you know this, but if you post in the Bug Reports category, the Bug Report template needs to be carefully filled out.

1 Like

You should paste without formatting Ctrl/CMD-shift-v

1 Like

Oh I didn’t even think about that!

Sure, though it would be nice to press CMD V and have Obsidian take care it automatically.

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