I use Obsidian extensively to store code for various smaller tasks. Double clicking a code block, pressing ctrl-c and then pasting a code block including the ending newline is tiresome.
Proposed solution
When hovering over a code block, reveal a small button that adds the content of the block to the clipboard, excluding the ending newline.