Copy+Paste code from forum inserts junk characters #4906
Replies: 1 comment
-
Posted at 2015-08-17 by @gfwilliams I know... I've had this a few times as well - I thought it might have been Linux ;) So if I did:
that would have the problem? Hmm. Nope. Can you remember which post you copied recently that had the problem on it, and I can try and track it down. Worst case I can make the Web IDE ignore 0xAD in pasted data I guess. I'm not sure there's a valid reason to want to paste that in. Posted at 2015-08-17 by DrAzzy http://forum.espruino.com/conversations/272143/ Copy paste the code in that thread into something that displays weird characters. Both the code I posted and the code you posted do it Posted at 2015-08-18 by @gfwilliams Thanks! Looks like it's Other editors I tested just now (eclipse, gedit) seem to ignore it (or at least don't display it), so I've just changed the code in the Web IDE to do the same. I'll upload a new version to the web store this week hopefully. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-08-17 by DrAzzy
When I copy and paste from the forum (for example, I copy/pasted your code from the port expander example thread for the error checking on mode), it seems to randomly but deterministically insert non-printing characters. Specifically, between index and Of in indexOf, it inserted character code 0xAD once (which appears as a placeholder or invisible character (depending on the viewer), and between the d and e of mode on the first line, it inserts two of them. Always 0xAD
This is... kinda bad on a forum where we post code that people new to Espruino will try to use - even if it's not Espruino's fault, to a new user, it would look like it...
Beta Was this translation helpful? Give feedback.
All reactions