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

Line wraps breaking numbers (causes syntax error) #488

Closed
zacaway opened this issue Jul 3, 2014 · 1 comment
Closed

Line wraps breaking numbers (causes syntax error) #488

zacaway opened this issue Jul 3, 2014 · 1 comment
Milestone

Comments

@zacaway
Copy link

zacaway commented Jul 3, 2014

To reproduce, enter copy the following into jsbeautifier.org and set indent = 2 spaces, wrap lines near 80 columns:

var x = [110.41, 92.26, 109.94, 94.84, 109.51, 97.89, 109.12, 282.57, 139.57, 283.05, 139.71, 283.37, 140.00, 284.00, 170.59, 262.06, 171.84, 262.49, 173.45];

When you beautify this, it results in the following output:

var x = [110.41, 92.26, 109.94, 94.84, 109.51, 97.89, 109.12, 282.57, 139.57,
  283.05, 139.71, 283.37, 140.00, 284.00, 170.59, 262.06, 171.84, 262.49, 173
  .45]; 

Note the last number has been broken at the decimal point into "173" and ".45" on the next line (which is a syntax error).

@evocateur evocateur added the bug label Jul 3, 2014
@bitwiseman bitwiseman added this to the v1.5.2 milestone Sep 12, 2014
@bitwiseman
Copy link
Member

Wow, ugly. But should be an easy fix.

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

No branches or pull requests

3 participants