js-beautify icon indicating copy to clipboard operation
js-beautify copied to clipboard

fix invalid json being generated with wrap_line_length

Open jseward opened this issue 3 years ago • 3 comments

was creating json that split the line between "-" and the numeric value.

ex.

{
  "1234567891234567891234567891234": -
  4
}

Description

  • [x] Source branch in your fork has meaningful name (not main)

Fixes Issue:

Before Merge Checklist

These items can be completed after PR is created.

(Check any items that are not applicable (NA) for this PR)

  • [x] JavaScript implementation
  • [x] Python implementation (NA if HTML beautifier)
  • [x] Added Tests to data file(s)
  • [x] Added command-line option(s) (NA if
  • [x] README.md documents new feature/option(s)

jseward avatar May 08 '21 07:05 jseward

fixes https://github.com/beautify-web/js-beautify/issues/1932

jseward avatar May 08 '21 07:05 jseward

@jseward Please add a test similar to this:

https://github.com/beautify-web/js-beautify/blob/9e8db5879af66178d05fc70ba7725fbd1b22aaea/test/data/javascript/tests.js#L218-L230

This will let you set options and test input vs outputs easily and will ensure the test works on both implementations of the beautifier.

You also need to test for "+4", right?

bitwiseman avatar May 17 '21 20:05 bitwiseman

@jseward When do you think you'll get around to working on this?

bitwiseman avatar Nov 01 '21 20:11 bitwiseman