Skip to content

Line fade is kept #2390

@top-master

Description

@top-master

Description

While packers usually remove new-lines and other white-spaces,
to save some bytes, some replace \n characters with an actual real new-lines.

Input

The code looked like this before beautification:

let pattern=`[ 	
\f\r]`;

Where first line ends with white-spaces.

Expected Output

let pattern = `[ \t\n\f\r]`;

Actual Output

Almost same as input, however, since I saved with VSCode, the line-end's whitespaces are gone, like:

let pattern = `[
\f\r]`;

Steps to Reproduce

  1. Open https://beautifier.io/
  2. Paste above input into the large text-field.
  3. Press the "Beautify Code" button, to get result which replaces said text-field's content.
  4. Create a new file using VS Code.
  5. Copy & paste step 3's result into said file, then save.

Environment

OS: Windows

Settings

{
  "indent_size": "2",
  "indent_char": " ",
  "max_preserve_newlines": "-1",
  "preserve_newlines": false,
  "keep_array_indentation": false,
  "break_chained_methods": true,
  "indent_scripts": "normal",
  "brace_style": "collapse",
  "space_before_conditional": true,
  "unescape_strings": false,
  "jslint_happy": false,
  "end_with_newline": false,
  "wrap_line_length": "80",
  "indent_inner_html": false,
  "comma_first": false,
  "e4x": true,
  "indent_empty_lines": false
}

P.S. Could it be possible to make the settings past-able into the web-page?
Since I sometimes clear the cookies and such, it would be good if I later could paste settings like I did above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions