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

Do not remove whitespace after number #1950

Closed
RaoHai opened this issue Jul 1, 2021 · 11 comments · Fixed by #2011
Closed

Do not remove whitespace after number #1950

RaoHai opened this issue Jul 1, 2021 · 11 comments · Fixed by #2011

Comments

@RaoHai
Copy link

RaoHai commented Jul 1, 2021

Description

Whitespace after number have been removed, which will case an Uncaught SyntaxError: Invalid or unexpected token error.

Input

The code looked like this before beautification:

1000000000000000100 .toFixed(0)!=="1000000000000000128")

Expected Output

The code should have looked like this after beautification:

1000000000000000100 .toFixed(0) !== "1000000000000000128")

Actual Output

The code actually looked like this after beautification:

1000000000000000100.toFixed(0) !== "1000000000000000128")

Steps to Reproduce

Environment

OS:

Settings

@1bsilver
Copy link

1bsilver commented Jul 2, 2021

Hi, I am a beginner.
I would like to work on this issue.
Can you guide me?

@bitwiseman
Copy link
Member

@1bsilver
Start by following the instructions in the CONTRIBUTING.md file to get your environment set up. If you get stuck, we can discuss further on gitter.im .

@adist98
Copy link

adist98 commented Jul 22, 2021

Is this issue up for grabs? Interested in working on it.

@bitwiseman bitwiseman assigned adist98 and unassigned 1bsilver Jul 23, 2021
@sahilmore-git
Copy link

Where can I find this code for debugging ??

@Abhishek-Srivas
Copy link

Hello, I just went through the folder structure and contributing.MD file. Can you suggest to me where the beautification code is handled for this case, is it in root/js/src/javascript/beautifier.js .
I would like to solve the issue. If you can guide me a bit.

@bitwiseman
Copy link
Member

The fix here is probably to have the handle_dot() check if the previous token was a number and preserve the space.

Denpoly added a commit to Denpoly/js-beautify that referenced this issue Nov 10, 2021
Denpoly added a commit to Denpoly/js-beautify that referenced this issue Nov 10, 2021
@Larreth
Copy link

Larreth commented Nov 30, 2021

Agree with @bitwiseman

@bharathks005
Copy link

Hi Team, I'm a full stack web developer, I want to contribute these project. First, I will start debug after the number whitespace remove issue. I want to know is there any standard format for creating new branch for bug fix?

@bhaveshvasnani
Copy link
Contributor

@bitwiseman I do not see much progress on this so far. Also, the PR #1956 has no updates. Could you please let me know if this issue is up for grabs if the previous owner doesn't have plans to work on it? Thanks!

@bitwiseman
Copy link
Member

@bhaveshvasnani
Go ahead and work on it. It can't hurt.

@bhaveshvasnani
Copy link
Contributor

Thanks!! I'll work on this and also agree that the fix should be in handle_dot() itself.

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

Successfully merging a pull request may close this issue.

9 participants