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

[Feature request] --disable-preserve-newlines to one line #74

Closed
JamieMason opened this issue Oct 4, 2011 · 4 comments
Closed

[Feature request] --disable-preserve-newlines to one line #74

JamieMason opened this issue Oct 4, 2011 · 4 comments

Comments

@JamieMason
Copy link

Could it be configurable so that multiple consecutive empty lines can be replaced with one empty line rather than removed entirely?

e.g.

function Whatever ()
{
  var a = 1;


  this.something = 1;
  this.blah = function ()
  {

  }



  this.blah2 = function ()
  {

  }




};

becomes

function Whatever ()
{
  var a = 1;

  this.something = 1;
  this.blah = function ()
  {

  }

  this.blah2 = function ()
  {

  }

};

rather than

function Whatever ()
{
  var a = 1;
  this.something = 1;
  this.blah = function ()
  {
  }
  this.blah2 = function ()
  {
  }
};

Thanks again for your time.

@einars
Copy link
Contributor

einars commented Feb 3, 2012

Make sense to me as a default blank line preservation behavior, I'll take a stab at that.

@bitwiseman
Copy link
Member

@einars - Isn't this done (max_preserve_newlines)?

@einars
Copy link
Contributor

einars commented Apr 26, 2013

Yep, max_preserve_newlines = 2 (or is it 1?) should provide this behavior.

@bitwiseman
Copy link
Member

Looks like max_preserve_newlines = 2 does it, but this isn't exposed on the webpage yet. Can probably fix #199 at the same time as exposing this.

Kingwl pushed a commit to Kingwl/js-beautify that referenced this issue Sep 18, 2017
structure refactor and breadcrumbs
Kingwl pushed a commit to Kingwl/js-beautify that referenced this issue Sep 18, 2017
fix beautifier#73 beautifier#74 beautifier#78

1. 日志默认显示高危,且无日志时提示搜索全部
2. 调整导航栏:调整路由结构,增加面包屑
3. 增加日志导出视图。及其相关API

See merge request !26
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