Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

property deleted by atom-beautify #1835

Closed
3 of 5 tasks
benpptung opened this issue Sep 6, 2017 · 6 comments
Closed
3 of 5 tasks

property deleted by atom-beautify #1835

benpptung opened this issue Sep 6, 2017 · 6 comments

Comments

@benpptung
Copy link

Description

The results of beautification are not what I expect.

Input Before Beautification

This is what the code looked like before:

var o = { uploading: e.loaded/e.total*100 }

Expected Output

The beautified code should have looked like this:

var o = {
  uploading: e.loaded / e.total*100
}

Actual Output

The beautified code actually looked like this:

var o = {
  uploading: e.loaded / e.*100
}

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
@benpptung benpptung changed the title word detailed by atom-beautify word deleted by atom-beautify Sep 6, 2017
@benpptung benpptung changed the title word deleted by atom-beautify property deleted by atom-beautify Sep 6, 2017
@stevenzeck
Copy link
Contributor

Which language and beautifier are you using? Can you generate a debug gist?

@benpptung
Copy link
Author

Hi, szeck87 , thank you for reply.
I am using the default settings, so I assume the beautifier is JS Beautify and the language is JavaScript. My atom version is 1.20.1 x64. Hope it helps. :)

@stevenzeck
Copy link
Contributor

I'm not able to recreate. Can you debug and post a gist of the log to this? Also, is this the only code in that file? If not, please upload the file itself. Both of these will help troubleshoot the issue.

@prettydiff
Copy link
Collaborator

I remember seeing something like this a while ago. I bet this is an issue with old Pretty Diff. It does not appear to be present in the current version of Pretty Diff.

If my guess is correct then this issue will be resolved by completing this pull request: #1750. The pull request is held by a conflict with a newer dependency.

@stevenzeck
Copy link
Contributor

@prettydiff Ah you're right. I switched to prettydiff and it did just that.

@benpptung Try switching to js-beautify as the default javascript beautifier.

@prettydiff
Copy link
Collaborator

The latest version of Pretty Diff is published to Atom Beautify where this issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants