DarrenOfficial/dpaste

Remove extra formatting when copying and pasting from dpaste

some1ataplace opened this issue · 4 comments

SyntaxError: invalid character in identifier

SyntaxError: invalid syntax

error: cannot format : '\u200b'

Whenever I copy and paste from dpaste into a text editor (xed) then run the code, there is some sort of extra formatting applied to newlines by itself usually. There may be other instances where extra formatting occurs, but I don't remember what it was.

It would be nice to remove this extra formatting from the paste so that it it can easily copy and paste into a text editor and have it return no errors. Each time I need to delete the newline characters by pressing the backspace/delete key twice manually for each newline in the code to resolve the errors.

I don't see the extra formatting that you're talking about, afaik dpaste does not add an extra line at the end of code / pastes.

Could this be related to your issue? linuxmint/xed#195

Quite possibly the same problem but it may happen on a few other text editors so it might be worth testing. But it could be just a text editor problem only so who knows.

The extra characters show up not just at the end of the file for me like others in that issue thread mentioned, it is every time in your code you press the enter key.

For example:

print('hello world')

print('hello again')

Becomes:

print('hello world')
'\u200b'
print('hello again')
'\u200b'

Could you try copying /raw instead, see if that zero-width characters still shows up.

Also what browser are you using?

Wow I did not think about doing that with /raw. It works with /raw but with regular it does not. Firefox.