obsidian-codemirror-options icon indicating copy to clipboard operation
obsidian-codemirror-options copied to clipboard

Copied text always has a newline at the end

Open NomarCub opened this issue 3 years ago • 2 comments

It's inconvenient for example in case of pasting code snippets into a shell. Originally mentioned in https://github.com/nothingislost/obsidian-codemirror-options/issues/5.

NomarCub avatar Sep 12 '21 11:09 NomarCub

Now the copied text is always trimmed, which gets rid of intentional whitespaces too. (I had this issue earlier too - https://github.com/superDuperCyberTechno/obsidian-code-copy/issues/5).

NomarCub avatar Sep 13 '21 16:09 NomarCub

Haha, do you want white space or not??? Seriously, though, I get it. CodeMirror makes this a pain. The assumption in that issue you referenced is not entirely accurate. There are circumstances when CodeMirror does not include a trailing line break so I'll have to see how I can account for all scenarios appropriately.

nothingislost avatar Sep 13 '21 17:09 nothingislost