Paste text with extra empty lines

What I’m trying to do

I am trying to copy code(plain text) and paste to obsidian.
However, when I pasted to obsidian, each line is inserted a new empty line.

The lines in red blanks are extra added empty lines.

I guess this is due to \n and \r\n in problem.

Is there a way not to paste the extra empty line?
Is there any settings or plug-in can solve that?

thx

I assume you’re pasting from a web page.

Try just doing Ctrl/Cmd+Shift+V to paste as plaintext.

If you do a lot of code pasting, you can go to Settings → Editor and disable Convert pasted HTML to Markdown

image

If this doesn’t work let me know and I can try a few other things.

ctrl+shift+v works good.

thanks