Atom changes code when uploading to gh-pages or server? (Possible Bug)


#1

I think i found a really strange bug on atom. You might want to take a look at this video i made for you, on youtube where you can see the bug in action:

I was working with atom on a project and pushing the code to the github gh-pages. Suddenly i realized the web page was not loading correctly on gh-pages.

I though i had made a mistake deleting an " or a parenthesis, on the code without noticing it, but then i began to make some further testing and debugging only to discover that that when i upload or pushed the code from atom (to github or my server) the problem SHOWS, but NOT when uploading THE EXACT SAME CODE (with hidden files and everything) through webstorm.

I know that sounds super weird. (or maybe super naive) But i did test it more than 5 times, and every time i got the same results.

I you need a copy of the project i was working with, to make the test yourself (pretty simple langing page) just let me know.


#2

Are you using a package to do this? If so, which one?


#3

Hello @leedohm. The first time i encountered the problem i was NOT using any package or plugin to upload the code, i was simply using the terminal to upload it to gh-pages on github.

Then, i thought, maybe GH-PAGES is the problem, since the page worked fine LOCALLY, and thats why i installed sftp-deployment (https://atom.io/packages/SFTP-deployment) to upload the code to my server on digital ocean.

And it was much letter that i realized what i explain on the video. If i upload the code through webstorm it works, through atom it doesn’t. (weird)


#4

Unfortunately, it’s a long video … do you have a minimum repro? Like just do these five steps and :boom:? Also it would be best if you could repro it just running Atom in Safe Mode, that way we can figure out if it is a bug in Atom itself or some package that you have installed.


#5

@leedohm i was documenting the steps to reproduce the “bug” and found out the problem. It’s kinda weird though. But i dont think its an atom bug at all. It more related to the autocomplete-paths plug-in.

Turns out we have installed the autocomplete-paths plug in, (https://atom.io/packages/autocomplete-paths) and we had an file called ñ.png. Also we have a spanish keyboard so we have both n and ñ on the keyboard. When you hit n (not ñ) the autocomplete path suggests the ñ.png (most correctly) BUT, if you hit ENTER and let the plug in CORRECTLY and automatically add the ñ.png path on code, turns out that the ñ somehow is a FAKE. So you have to type it manually, even if it shows an ñ.

Somehow when you upload the code via webstorm, the fake ñ, converts to a real ñ, but not on atom.

Weird.


#6

That is weird. Would you mind documenting this in an Issue on https://github.com/atom/autocomplete-plus? Also, if it isn’t something proprietary, would you mind including a copy of the file with the fake ñ in it? (Perhaps stored in a zip file so that we can be sure that any encoding issues are retained.)


#7

Mac file system is known to store diacritic in decomposed form.

IE
ñ Unicode Character ‘LATIN SMALL LETTER N WITH TILDE’ (U+00F1)

Will be stored as
~ Unicode Character ‘COMBINING TILDE’ (U+0303)
n Unicode Character ‘LATIN SMALL LETTER N’ (U+006E)

It is possible to switch between form using unicode normalisation, but Javascript has no built in support for that.