Giter Club home page Giter Club logo

Comments (10)

namick avatar namick commented on May 30, 2024 2

I can verify that this happens occasionally for me as well. Undo and reformat works around the issue. I'll continue to watch and see if I can find a pattern.

from vscode-erb-beautify.

axelgrubba avatar axelgrubba commented on May 30, 2024

@p2pow350 Facing similar issues. Same happens when using 'Replace All' function in VS Code, where random files get saved as empty losing all the code. Currently I usually disable the extension before doing such operations but obviously it's a bit of a hassle and really prone to error when the extension is enabled and the file gets emptied by mistake and committed to the repo.

from vscode-erb-beautify.

vassyz avatar vassyz commented on May 30, 2024

This has been going on for a while, and I usually just undo the empty file and save again. But this time I ended up committing an empty file. htmlbeautifier hasn't been updated in 2 years, so I don't really have much hope for getting a fix.

from vscode-erb-beautify.

p2pow350 avatar p2pow350 commented on May 30, 2024

This has been going on for a while, and I usually just undo the empty file and save again. But this time I ended up committing an empty file. htmlbeautifier hasn't been updated in 2 years, so I don't really have much hope for getting a fix.

yes, I'm doing same actions as you or sometimes I'm setting file type as Text so it will not apply format (more or less as @axelgrubba ).
I'm undoing and saving file again, but sometimes I need to retry several times before the files will be updated correctly and this is a little bit annoying....another problem is that I haven't found an alternative for formatting ERB

Btw thanks for you suggestions

from vscode-erb-beautify.

aliariff avatar aliariff commented on May 30, 2024

Hi everyone,
Could someone please give me a small example of reproducing this issue?

from vscode-erb-beautify.

vassyz avatar vassyz commented on May 30, 2024

@aliariff I can't give you the exact way to reproduce it, because it happens randomly. But the way I can replicate it is to keep saving an .html.erb file. On a Mac if you press cmd + s from once to fifty times it will happen.

from vscode-erb-beautify.

kirley avatar kirley commented on May 30, 2024

I am having the same issue. It happens for me when there is a change in the file (even a new line space) and then on my mac I hold down Command + S (sometimes i have to hit "S" multiple times while holding down CMD to reproduce it).

from vscode-erb-beautify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.