[Resolved] Mismatch between formatted file in Elm and what is displayed


#1

https://glitch.com/edit/#!/bitly-elm?path=source/main.elm:1:0 is the file in question.

I ran elm-format from the console, and also used “touch” to update the date of the file.
I also refreshed the screen, closed the window, reopened the project in Glitch.

Still main.elm in the editor is not matching what was the formatted output by elm-format.

Why this mismatch?

% ashok


#2

Hi @kgashok, under some conditions when you’re modifying files in the console the files in the editor can get out of sync with the content on disk. This can persist even after reloading the project. I suspect that’s what’s happening when you run elm-format in the console.

To force the files on disk and the files displayed in the editor back into sync you can run the refresh command in the console.


#3

Got it, thanks much!