Obsidian adds empty lines to my code when I paste it

Paste with Ctrl+Shift+V (or Option + Cmd + Shift + V on Mac). It will paste in plain-text, rather than with formatting.

This is not an Obsidian thing. Pasting as plain-text is a great shortcut to know for all apps - example Excel or Google Sheets.

3 Likes